si-funciona 2.6.2 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -9
- package/browser/siFunciona.js +62 -66
- package/browser/siFunciona.min.js +1 -1
- package/dist/helpers/numbers/randomInteger.d.ts +18 -18
- package/dist/helpers/numbers/randomInteger.js +24 -24
- package/dist/helpers/numbers/randomNumber.d.ts +13 -13
- package/dist/helpers/numbers/randomNumber.js +19 -19
- package/dist/helpers/objects/cloneObject.d.ts +17 -19
- package/dist/helpers/objects/cloneObject.js +29 -31
- package/dist/helpers/objects/mergeObjectsBase.d.ts +38 -35
- package/dist/helpers/objects/mergeObjectsBase.js +89 -91
- package/dist/helpers/objects/mergeObjectsBase.min.js +1 -1
- package/dist/helpers/objects.d.ts +121 -121
- package/package.json +1 -1
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Simplify working with object by providing array-like parsing. Also, provides cloning and merging along with accessors that always have a return value for optimal nesting.
|
|
3
|
-
* @file
|
|
4
|
-
* @author Joshua Heagle <joshuaheagle@gmail.com>
|
|
5
|
-
* @version 1.0.0
|
|
6
|
-
* @module objectHelpers
|
|
7
|
-
* @memberOf module:siFunciona
|
|
8
|
-
*/
|
|
9
|
-
import cloneObject from './objects/cloneObject';
|
|
10
|
-
import dotGet from './objects/dotGet';
|
|
11
|
-
import dotNotate from './objects/dotNotate';
|
|
12
|
-
import dotSet from './objects/dotSet';
|
|
13
|
-
import dotUnset from './objects/dotUnset';
|
|
14
|
-
import emptyObject from './objects/emptyObject';
|
|
15
|
-
import filterObject from './objects/filterObject';
|
|
16
|
-
import isCloneable from './objects/isCloneable';
|
|
17
|
-
import isEqual from './objects/isEqual';
|
|
18
|
-
import isInstanceObject from './objects/isInstanceObject';
|
|
19
|
-
import isObject from './objects/isObject';
|
|
20
|
-
import mapObject from './objects/mapObject';
|
|
21
|
-
import mergeObjects from './objects/mergeObjects';
|
|
22
|
-
import mergeObjectsBase from './objects/mergeObjectsBase';
|
|
23
|
-
import mergeObjectsMutable from './objects/mergeObjectsMutable';
|
|
24
|
-
import objectKeys from './objects/objectKeys';
|
|
25
|
-
import objectValues from './objects/objectValues';
|
|
26
|
-
import reduceObject from './objects/reduceObject';
|
|
27
|
-
import setAndReturnValue from './objects/setAndReturnValue';
|
|
28
|
-
import setValue from './objects/setValue';
|
|
29
|
-
export { cloneObject, dotGet, dotNotate, dotSet, dotUnset, emptyObject, filterObject, isCloneable, isEqual, isInstanceObject, isObject, mapObject, mergeObjects, mergeObjectsBase, mergeObjectsMutable, objectKeys, objectValues, reduceObject, setAndReturnValue, setValue };
|
|
30
|
-
declare const _default: {
|
|
31
|
-
cloneObject: (object: object, { mapLimit, depthLimit, relevancyRange }?: {
|
|
32
|
-
mapLimit?: number;
|
|
33
|
-
depthLimit?: number;
|
|
34
|
-
relevancyRange?: number;
|
|
35
|
-
}) => object;
|
|
36
|
-
dotGet: (arrayObject: import("./objects/dotNotate").dotNotateableItem, dotNotation: import("./objects/dotNotate").dotNotationString, defaultValue?: string | null) => any;
|
|
37
|
-
dotNotate: (arrayObject: object, retainObjects?: Array<import("./objects/dotNotate").dotNotationString>) => {
|
|
38
|
-
[k: string]: any;
|
|
39
|
-
};
|
|
40
|
-
dotSet: (arrayObject: import("./objects/dotNotate").dotNotateableItem, dotNotation: import("./objects/dotNotate").dotNotationString, value?: any) => import("./objects/dotNotate").dotNotateableItem;
|
|
41
|
-
dotUnset: (arrayObject: import("./objects/dotNotate").dotNotateableItem, dotNotation: import("./objects/dotNotate").dotNotationString) => import("./objects/dotNotate").dotNotateableItem;
|
|
42
|
-
emptyObject: (item: Array<any> | Object) => boolean;
|
|
43
|
-
filterObject: (obj: any[] | {
|
|
44
|
-
[k: string]: any;
|
|
45
|
-
[k: number]: any;
|
|
46
|
-
}, fn: (currentProperty: any, currentIndex: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "toLocaleString" | "join" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "find" | "findIndex" | "entries" | "keys" | "values" | "pop" | "push" | "reverse" | "shift" | "sort" | "splice" | "unshift" | "fill" | "copyWithin", object: any[] | {
|
|
47
|
-
[k: string]: any;
|
|
48
|
-
[k: number]: any;
|
|
49
|
-
}) => boolean, thisArg?: any[] | {
|
|
50
|
-
[k: string]: any;
|
|
51
|
-
[k: number]: any;
|
|
52
|
-
}) => any[] | {
|
|
53
|
-
[k: string]: any;
|
|
54
|
-
[k: number]: any;
|
|
55
|
-
};
|
|
56
|
-
isCloneable: (value: Array<any> | Object | any) => boolean;
|
|
57
|
-
isEqual: (first: any, second: any) => boolean;
|
|
58
|
-
isInstanceObject: (object: Array<any> | Object) => boolean;
|
|
59
|
-
isObject: (object: any) => boolean;
|
|
60
|
-
mapObject: (obj: any[] | {
|
|
61
|
-
[k: string]: any;
|
|
62
|
-
[k: number]: any;
|
|
63
|
-
}, fn: (currentProperty: any, currentIndex: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "toLocaleString" | "join" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "find" | "findIndex" | "entries" | "keys" | "values" | "pop" | "push" | "reverse" | "shift" | "sort" | "splice" | "unshift" | "fill" | "copyWithin", object: any[] | {
|
|
64
|
-
[k: string]: any;
|
|
65
|
-
[k: number]: any;
|
|
66
|
-
}) => any, thisArg?: any[] | {
|
|
67
|
-
[k: string]: any;
|
|
68
|
-
[k: number]: any;
|
|
69
|
-
}) => any[] | {
|
|
70
|
-
[k: string]: any;
|
|
71
|
-
[k: number]: any;
|
|
72
|
-
};
|
|
73
|
-
mergeObjects: (...objects: Array<Object>) => any[] | {
|
|
74
|
-
[k: string]: any;
|
|
75
|
-
[k: number]: any;
|
|
76
|
-
};
|
|
77
|
-
mergeObjectsBase: ({
|
|
78
|
-
mapLimit?: number;
|
|
79
|
-
depthLimit?: number;
|
|
80
|
-
relevancyRange?: number;
|
|
81
|
-
map?: import("./functions/relevancyFilter").relevanceMap;
|
|
82
|
-
useClone?: boolean;
|
|
83
|
-
}) => (...objects: Array<Object>) => any[] | {
|
|
84
|
-
[k: string]: any;
|
|
85
|
-
[k: number]: any;
|
|
86
|
-
};
|
|
87
|
-
mergeObjectsMutable: (...objects: Array<Object>) => any[] | {
|
|
88
|
-
[k: string]: any;
|
|
89
|
-
[k: number]: any;
|
|
90
|
-
};
|
|
91
|
-
objectKeys: (object: any[] | {
|
|
92
|
-
[k: string]: any;
|
|
93
|
-
[k: number]: any;
|
|
94
|
-
}, includeInherited?: boolean) => Array<any>;
|
|
95
|
-
objectValues: (object: any[] | {
|
|
96
|
-
[k: string]: any;
|
|
97
|
-
[k: number]: any;
|
|
98
|
-
}, includeInherited?: boolean) => Array<any>;
|
|
99
|
-
reduceObject: (obj: any[] | {
|
|
100
|
-
[k: string]: any;
|
|
101
|
-
[k: number]: any;
|
|
102
|
-
}, fn: (accumulator: any, currentProperty: any, currentIndex: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "toLocaleString" | "join" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "find" | "findIndex" | "entries" | "keys" | "values" | "pop" | "push" | "reverse" | "shift" | "sort" | "splice" | "unshift" | "fill" | "copyWithin", object: any[] | {
|
|
103
|
-
[k: string]: any;
|
|
104
|
-
[k: number]: any;
|
|
105
|
-
}) => any, initialValue?: any[] | {
|
|
106
|
-
[k: string]: any;
|
|
107
|
-
[k: number]: any;
|
|
108
|
-
}) => any;
|
|
109
|
-
setAndReturnValue: (item: any[] | {
|
|
110
|
-
[k: string]: any;
|
|
111
|
-
[k: number]: any;
|
|
112
|
-
}, key: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "toLocaleString" | "join" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "find" | "findIndex" | "entries" | "keys" | "values" | "pop" | "push" | "reverse" | "shift" | "sort" | "splice" | "unshift" | "fill" | "copyWithin", value: any) => any;
|
|
113
|
-
setValue: (key: number | string, value: any, item: any[] | {
|
|
114
|
-
[k: string]: any;
|
|
115
|
-
[k: number]: any;
|
|
116
|
-
}) => any[] | {
|
|
117
|
-
[k: string]: any;
|
|
118
|
-
[k: number]: any;
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
export default _default;
|
|
1
|
+
/**
|
|
2
|
+
* Simplify working with object by providing array-like parsing. Also, provides cloning and merging along with accessors that always have a return value for optimal nesting.
|
|
3
|
+
* @file
|
|
4
|
+
* @author Joshua Heagle <joshuaheagle@gmail.com>
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
* @module objectHelpers
|
|
7
|
+
* @memberOf module:siFunciona
|
|
8
|
+
*/
|
|
9
|
+
import cloneObject from './objects/cloneObject';
|
|
10
|
+
import dotGet from './objects/dotGet';
|
|
11
|
+
import dotNotate from './objects/dotNotate';
|
|
12
|
+
import dotSet from './objects/dotSet';
|
|
13
|
+
import dotUnset from './objects/dotUnset';
|
|
14
|
+
import emptyObject from './objects/emptyObject';
|
|
15
|
+
import filterObject from './objects/filterObject';
|
|
16
|
+
import isCloneable from './objects/isCloneable';
|
|
17
|
+
import isEqual from './objects/isEqual';
|
|
18
|
+
import isInstanceObject from './objects/isInstanceObject';
|
|
19
|
+
import isObject from './objects/isObject';
|
|
20
|
+
import mapObject from './objects/mapObject';
|
|
21
|
+
import mergeObjects from './objects/mergeObjects';
|
|
22
|
+
import mergeObjectsBase from './objects/mergeObjectsBase';
|
|
23
|
+
import mergeObjectsMutable from './objects/mergeObjectsMutable';
|
|
24
|
+
import objectKeys from './objects/objectKeys';
|
|
25
|
+
import objectValues from './objects/objectValues';
|
|
26
|
+
import reduceObject from './objects/reduceObject';
|
|
27
|
+
import setAndReturnValue from './objects/setAndReturnValue';
|
|
28
|
+
import setValue from './objects/setValue';
|
|
29
|
+
export { cloneObject, dotGet, dotNotate, dotSet, dotUnset, emptyObject, filterObject, isCloneable, isEqual, isInstanceObject, isObject, mapObject, mergeObjects, mergeObjectsBase, mergeObjectsMutable, objectKeys, objectValues, reduceObject, setAndReturnValue, setValue };
|
|
30
|
+
declare const _default: {
|
|
31
|
+
cloneObject: (object: object, { mapLimit, depthLimit, relevancyRange }?: {
|
|
32
|
+
mapLimit?: number;
|
|
33
|
+
depthLimit?: number;
|
|
34
|
+
relevancyRange?: number;
|
|
35
|
+
}) => object;
|
|
36
|
+
dotGet: (arrayObject: import("./objects/dotNotate").dotNotateableItem, dotNotation: import("./objects/dotNotate").dotNotationString, defaultValue?: string | null) => any;
|
|
37
|
+
dotNotate: (arrayObject: object, retainObjects?: Array<import("./objects/dotNotate").dotNotationString>) => {
|
|
38
|
+
[k: string]: any;
|
|
39
|
+
};
|
|
40
|
+
dotSet: (arrayObject: import("./objects/dotNotate").dotNotateableItem, dotNotation: import("./objects/dotNotate").dotNotationString, value?: any) => import("./objects/dotNotate").dotNotateableItem;
|
|
41
|
+
dotUnset: (arrayObject: import("./objects/dotNotate").dotNotateableItem, dotNotation: import("./objects/dotNotate").dotNotationString) => import("./objects/dotNotate").dotNotateableItem;
|
|
42
|
+
emptyObject: (item: Array<any> | Object) => boolean;
|
|
43
|
+
filterObject: (obj: any[] | {
|
|
44
|
+
[k: string]: any;
|
|
45
|
+
[k: number]: any;
|
|
46
|
+
}, fn: (currentProperty: any, currentIndex: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "toLocaleString" | "join" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "find" | "findIndex" | "entries" | "keys" | "values" | "pop" | "push" | "reverse" | "shift" | "sort" | "splice" | "unshift" | "fill" | "copyWithin", object: any[] | {
|
|
47
|
+
[k: string]: any;
|
|
48
|
+
[k: number]: any;
|
|
49
|
+
}) => boolean, thisArg?: any[] | {
|
|
50
|
+
[k: string]: any;
|
|
51
|
+
[k: number]: any;
|
|
52
|
+
}) => any[] | {
|
|
53
|
+
[k: string]: any;
|
|
54
|
+
[k: number]: any;
|
|
55
|
+
};
|
|
56
|
+
isCloneable: (value: Array<any> | Object | any) => boolean;
|
|
57
|
+
isEqual: (first: any, second: any) => boolean;
|
|
58
|
+
isInstanceObject: (object: Array<any> | Object) => boolean;
|
|
59
|
+
isObject: (object: any) => boolean;
|
|
60
|
+
mapObject: (obj: any[] | {
|
|
61
|
+
[k: string]: any;
|
|
62
|
+
[k: number]: any;
|
|
63
|
+
}, fn: (currentProperty: any, currentIndex: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "toLocaleString" | "join" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "find" | "findIndex" | "entries" | "keys" | "values" | "pop" | "push" | "reverse" | "shift" | "sort" | "splice" | "unshift" | "fill" | "copyWithin", object: any[] | {
|
|
64
|
+
[k: string]: any;
|
|
65
|
+
[k: number]: any;
|
|
66
|
+
}) => any, thisArg?: any[] | {
|
|
67
|
+
[k: string]: any;
|
|
68
|
+
[k: number]: any;
|
|
69
|
+
}) => any[] | {
|
|
70
|
+
[k: string]: any;
|
|
71
|
+
[k: number]: any;
|
|
72
|
+
};
|
|
73
|
+
mergeObjects: (...objects: Array<Object>) => any[] | {
|
|
74
|
+
[k: string]: any;
|
|
75
|
+
[k: number]: any;
|
|
76
|
+
};
|
|
77
|
+
mergeObjectsBase: ({ depthLimit, map, useClone, }?: {
|
|
78
|
+
mapLimit?: number;
|
|
79
|
+
depthLimit?: number;
|
|
80
|
+
relevancyRange?: number;
|
|
81
|
+
map?: import("./functions/relevancyFilter").relevanceMap;
|
|
82
|
+
useClone?: boolean;
|
|
83
|
+
}) => (...objects: Array<Object>) => any[] | {
|
|
84
|
+
[k: string]: any;
|
|
85
|
+
[k: number]: any;
|
|
86
|
+
};
|
|
87
|
+
mergeObjectsMutable: (...objects: Array<Object>) => any[] | {
|
|
88
|
+
[k: string]: any;
|
|
89
|
+
[k: number]: any;
|
|
90
|
+
};
|
|
91
|
+
objectKeys: (object: any[] | {
|
|
92
|
+
[k: string]: any;
|
|
93
|
+
[k: number]: any;
|
|
94
|
+
}, includeInherited?: boolean) => Array<any>;
|
|
95
|
+
objectValues: (object: any[] | {
|
|
96
|
+
[k: string]: any;
|
|
97
|
+
[k: number]: any;
|
|
98
|
+
}, includeInherited?: boolean) => Array<any>;
|
|
99
|
+
reduceObject: (obj: any[] | {
|
|
100
|
+
[k: string]: any;
|
|
101
|
+
[k: number]: any;
|
|
102
|
+
}, fn: (accumulator: any, currentProperty: any, currentIndex: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "toLocaleString" | "join" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "find" | "findIndex" | "entries" | "keys" | "values" | "pop" | "push" | "reverse" | "shift" | "sort" | "splice" | "unshift" | "fill" | "copyWithin", object: any[] | {
|
|
103
|
+
[k: string]: any;
|
|
104
|
+
[k: number]: any;
|
|
105
|
+
}) => any, initialValue?: any[] | {
|
|
106
|
+
[k: string]: any;
|
|
107
|
+
[k: number]: any;
|
|
108
|
+
}) => any;
|
|
109
|
+
setAndReturnValue: (item: any[] | {
|
|
110
|
+
[k: string]: any;
|
|
111
|
+
[k: number]: any;
|
|
112
|
+
}, key: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "toLocaleString" | "join" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "find" | "findIndex" | "entries" | "keys" | "values" | "pop" | "push" | "reverse" | "shift" | "sort" | "splice" | "unshift" | "fill" | "copyWithin", value: any) => any;
|
|
113
|
+
setValue: (key: number | string, value: any, item: any[] | {
|
|
114
|
+
[k: string]: any;
|
|
115
|
+
[k: number]: any;
|
|
116
|
+
}) => any[] | {
|
|
117
|
+
[k: string]: any;
|
|
118
|
+
[k: number]: any;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export default _default;
|
|
122
122
|
//# sourceMappingURL=objects.d.ts.map
|