mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Extract duplicate utility functions and add unit tests (no-changelog) (#9814)
This commit is contained in:
committed by
GitHub
parent
283d1ca583
commit
e4463c62b4
@@ -18,7 +18,7 @@ import get from 'lodash/get';
|
||||
import set from 'lodash/set';
|
||||
import unset from 'lodash/unset';
|
||||
|
||||
import { getResolvables, sanitazeDataPathKey } from '../../../../utils/utilities';
|
||||
import { getResolvables, sanitizeDataPathKey } from '../../../../utils/utilities';
|
||||
import type { SetNodeOptions } from './interfaces';
|
||||
import { INCLUDE } from './interfaces';
|
||||
|
||||
@@ -38,13 +38,13 @@ const configureFieldHelper = (dotNotation?: boolean) => {
|
||||
} else {
|
||||
return {
|
||||
set: (item: IDataObject, key: string, value: IDataObject) => {
|
||||
item[sanitazeDataPathKey(item, key)] = value;
|
||||
item[sanitizeDataPathKey(item, key)] = value;
|
||||
},
|
||||
get: (item: IDataObject, key: string) => {
|
||||
return item[sanitazeDataPathKey(item, key)];
|
||||
return item[sanitizeDataPathKey(item, key)];
|
||||
},
|
||||
unset: (item: IDataObject, key: string) => {
|
||||
delete item[sanitazeDataPathKey(item, key)];
|
||||
delete item[sanitizeDataPathKey(item, key)];
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user