si-funciona 2.6.1 → 2.6.2
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 +40 -10
- package/browser/siFunciona.js +18 -11
- package/dist/helpers/arrays/BasicQueue.d.ts +64 -64
- package/dist/helpers/arrays/BasicQueue.js +61 -61
- package/dist/helpers/arrays/addUniqueToArray.d.ts +9 -9
- package/dist/helpers/arrays/addUniqueToArray.js +16 -16
- package/dist/helpers/arrays/buildArray.d.ts +10 -10
- package/dist/helpers/arrays/buildArray.js +25 -25
- package/dist/helpers/arrays/buildArrayOfReferences.d.ts +10 -10
- package/dist/helpers/arrays/buildArrayOfReferences.js +22 -22
- package/dist/helpers/arrays/compareArrays.d.ts +96 -96
- package/dist/helpers/arrays/compareArrays.js +96 -96
- package/dist/helpers/arrays/mergeArrays.d.ts +8 -8
- package/dist/helpers/arrays/mergeArrays.js +21 -21
- package/dist/helpers/arrays/uniqueArray.d.ts +8 -8
- package/dist/helpers/arrays/uniqueArray.js +16 -16
- package/dist/helpers/arrays.d.ts +27 -27
- package/dist/helpers/arrays.js +74 -74
- package/dist/helpers/descriptors/assignDescriptor.d.ts +13 -13
- package/dist/helpers/descriptors/assignDescriptor.js +57 -57
- package/dist/helpers/descriptors/assignDescriptorDetail.d.ts +13 -13
- package/dist/helpers/descriptors/assignDescriptorDetail.js +36 -36
- package/dist/helpers/descriptors/checkClearValues.d.ts +11 -11
- package/dist/helpers/descriptors/checkClearValues.js +20 -20
- package/dist/helpers/descriptors/checkDescriptorComplete.d.ts +10 -10
- package/dist/helpers/descriptors/checkDescriptorComplete.js +19 -19
- package/dist/helpers/descriptors/cloneDescriptor.d.ts +9 -9
- package/dist/helpers/descriptors/cloneDescriptor.js +35 -35
- package/dist/helpers/descriptors/cloneDescriptorDetail.d.ts +9 -9
- package/dist/helpers/descriptors/cloneDescriptorDetail.js +26 -26
- package/dist/helpers/descriptors/compareDescriptor.d.ts +12 -12
- package/dist/helpers/descriptors/compareDescriptor.js +32 -32
- package/dist/helpers/descriptors/describeObject.d.ts +14 -14
- package/dist/helpers/descriptors/describeObject.js +52 -52
- package/dist/helpers/descriptors/describeObjectDetail.d.ts +13 -13
- package/dist/helpers/descriptors/describeObjectDetail.js +37 -37
- package/dist/helpers/descriptors/describeObjectMap.d.ts +35 -35
- package/dist/helpers/descriptors/describeObjectMap.js +107 -107
- package/dist/helpers/descriptors/nextReference.d.ts +12 -12
- package/dist/helpers/descriptors/nextReference.js +30 -30
- package/dist/helpers/descriptors/sameDescriptor.d.ts +12 -12
- package/dist/helpers/descriptors/sameDescriptor.js +21 -21
- package/dist/helpers/descriptors/samples/descriptor.d.ts +34 -34
- package/dist/helpers/descriptors/samples/descriptor.js +22 -22
- package/dist/helpers/descriptors/samples/descriptorDetail.d.ts +42 -42
- package/dist/helpers/descriptors/samples/descriptorDetail.js +24 -24
- package/dist/helpers/descriptors/samples/descriptorMap.d.ts +16 -16
- package/dist/helpers/descriptors/samples/descriptorMap.js +14 -14
- package/dist/helpers/descriptors/samples/mappedDescriptorMap.d.ts +10 -10
- package/dist/helpers/descriptors/samples/mappedDescriptorMap.js +287 -287
- package/dist/helpers/descriptors.d.ts +56 -56
- package/dist/helpers/descriptors.js +129 -129
- package/dist/helpers/functions/callWithParams.d.ts +10 -10
- package/dist/helpers/functions/callWithParams.js +16 -16
- package/dist/helpers/functions/curry.d.ts +10 -10
- package/dist/helpers/functions/curry.js +16 -16
- package/dist/helpers/functions/delay.d.ts +20 -20
- package/dist/helpers/functions/delay.js +31 -31
- package/dist/helpers/functions/makeBasicQueue.d.ts +9 -9
- package/dist/helpers/functions/makeBasicQueue.js +18 -18
- package/dist/helpers/functions/onBodyLoad.d.ts +9 -9
- package/dist/helpers/functions/onBodyLoad.js +75 -75
- package/dist/helpers/functions/pipe.d.ts +9 -9
- package/dist/helpers/functions/pipe.js +17 -17
- package/dist/helpers/functions/preloadParams.d.ts +19 -19
- package/dist/helpers/functions/preloadParams.js +20 -20
- package/dist/helpers/functions/queueManager.d.ts +48 -48
- package/dist/helpers/functions/queueManager.js +123 -123
- package/dist/helpers/functions/queueTimeout.d.ts +20 -20
- package/dist/helpers/functions/queueTimeout.js +22 -22
- package/dist/helpers/functions/relevancyFilter.d.ts +34 -34
- package/dist/helpers/functions/relevancyFilter.js +33 -33
- package/dist/helpers/functions/trace.d.ts +13 -13
- package/dist/helpers/functions/trace.js +24 -24
- package/dist/helpers/functions.d.ts +40 -40
- package/dist/helpers/functions.js +105 -105
- package/dist/helpers/numbers/absoluteMax.d.ts +9 -9
- package/dist/helpers/numbers/absoluteMax.js +15 -15
- package/dist/helpers/numbers/absoluteMin.d.ts +9 -9
- package/dist/helpers/numbers/absoluteMin.js +15 -15
- package/dist/helpers/numbers/compare.d.ts +12 -12
- package/dist/helpers/numbers/compare.js +18 -18
- package/dist/helpers/numbers/greatestCommonDivisor.d.ts +9 -9
- package/dist/helpers/numbers/greatestCommonDivisor.js +15 -15
- package/dist/helpers/numbers/leastCommonMultiple.d.ts +9 -9
- package/dist/helpers/numbers/leastCommonMultiple.js +17 -17
- package/dist/helpers/numbers/lowestCommonDenominator.d.ts +9 -9
- package/dist/helpers/numbers/lowestCommonDenominator.js +19 -19
- package/dist/helpers/numbers/randomInteger.d.ts +11 -5
- package/dist/helpers/numbers/randomInteger.js +11 -5
- package/dist/helpers/numbers/randomNumber.d.ts +7 -6
- package/dist/helpers/numbers/randomNumber.js +7 -6
- package/dist/helpers/numbers/simplestRatio.d.ts +8 -8
- package/dist/helpers/numbers/simplestRatio.js +28 -28
- package/dist/helpers/numbers.d.ts +30 -30
- package/dist/helpers/numbers.js +89 -89
- package/dist/helpers/objects/cloneObject.d.ts +19 -19
- package/dist/helpers/objects/cloneObject.js +31 -31
- package/dist/helpers/objects/dotGet.d.ts +11 -11
- package/dist/helpers/objects/dotGet.js +59 -59
- package/dist/helpers/objects/dotNotate.d.ts +27 -27
- package/dist/helpers/objects/dotNotate.js +79 -79
- package/dist/helpers/objects/dotSet.d.ts +11 -11
- package/dist/helpers/objects/dotSet.js +53 -53
- package/dist/helpers/objects/dotUnset.d.ts +10 -10
- package/dist/helpers/objects/dotUnset.js +52 -52
- package/dist/helpers/objects/emptyObject.d.ts +8 -8
- package/dist/helpers/objects/emptyObject.js +17 -17
- package/dist/helpers/objects/filterObject.d.ts +26 -26
- package/dist/helpers/objects/filterObject.js +33 -33
- package/dist/helpers/objects/isCloneable.d.ts +8 -8
- package/dist/helpers/objects/isCloneable.js +16 -16
- package/dist/helpers/objects/isEqual.d.ts +16 -16
- package/dist/helpers/objects/isEqual.js +100 -100
- package/dist/helpers/objects/isInstanceObject.d.ts +8 -8
- package/dist/helpers/objects/isInstanceObject.js +26 -26
- package/dist/helpers/objects/isObject.d.ts +8 -8
- package/dist/helpers/objects/isObject.js +14 -14
- package/dist/helpers/objects/mapObject.d.ts +25 -25
- package/dist/helpers/objects/mapObject.js +25 -25
- package/dist/helpers/objects/mergeObjects.d.ts +12 -12
- package/dist/helpers/objects/mergeObjects.js +19 -19
- package/dist/helpers/objects/mergeObjectsBase.d.ts +35 -35
- package/dist/helpers/objects/mergeObjectsBase.js +91 -91
- package/dist/helpers/objects/mergeObjectsMutable.d.ts +12 -12
- package/dist/helpers/objects/mergeObjectsMutable.js +17 -17
- package/dist/helpers/objects/objectKeys.d.ts +13 -13
- package/dist/helpers/objects/objectKeys.js +39 -39
- package/dist/helpers/objects/objectValues.d.ts +13 -13
- package/dist/helpers/objects/objectValues.js +20 -20
- package/dist/helpers/objects/reduceObject.d.ts +30 -30
- package/dist/helpers/objects/reduceObject.js +25 -25
- package/dist/helpers/objects/setAndReturnValue.d.ts +13 -13
- package/dist/helpers/objects/setAndReturnValue.js +19 -19
- package/dist/helpers/objects/setValue.d.ts +14 -14
- package/dist/helpers/objects/setValue.js +21 -21
- package/dist/helpers/objects.d.ts +121 -121
- package/dist/helpers/objects.js +177 -177
- package/dist/helpers/strings/camelCase.d.ts +8 -8
- package/dist/helpers/strings/camelCase.js +19 -19
- package/dist/helpers/strings/kabobCase.d.ts +8 -8
- package/dist/helpers/strings/kabobCase.js +18 -18
- package/dist/helpers/strings/makeFilepath.d.ts +9 -9
- package/dist/helpers/strings/makeFilepath.js +49 -49
- package/dist/helpers/strings/makeRelativePath.d.ts +9 -9
- package/dist/helpers/strings/makeRelativePath.js +43 -43
- package/dist/helpers/strings/regexEscape.d.ts +8 -8
- package/dist/helpers/strings/regexEscape.js +15 -15
- package/dist/helpers/strings/snakeCase.d.ts +8 -8
- package/dist/helpers/strings/snakeCase.js +18 -18
- package/dist/helpers/strings/strAfter.d.ts +9 -9
- package/dist/helpers/strings/strAfter.js +18 -18
- package/dist/helpers/strings/strAfterLast.d.ts +9 -9
- package/dist/helpers/strings/strAfterLast.js +18 -18
- package/dist/helpers/strings/strBefore.d.ts +9 -9
- package/dist/helpers/strings/strBefore.js +18 -18
- package/dist/helpers/strings/strBeforeLast.d.ts +9 -9
- package/dist/helpers/strings/strBeforeLast.js +18 -18
- package/dist/helpers/strings/titleCase.d.ts +8 -8
- package/dist/helpers/strings/titleCase.js +19 -19
- package/dist/helpers/strings/ucFirst.d.ts +8 -8
- package/dist/helpers/strings/ucFirst.js +14 -14
- package/dist/helpers/strings/words.d.ts +9 -9
- package/dist/helpers/strings/words.js +15 -15
- package/dist/helpers/strings.d.ts +38 -38
- package/dist/helpers/strings.js +121 -121
- package/dist/main.d.ts +15 -15
- package/dist/main.js +103 -103
- package/package.json +4 -4
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
require('core-js/modules/esnext.iterator.constructor.js')
|
|
8
|
-
require('core-js/modules/esnext.iterator.map.js')
|
|
9
|
-
const _isObject = _interopRequireDefault(require('./isObject'))
|
|
10
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
11
|
-
/**
|
|
12
|
-
* Convert an array of keys into a regex, return a function to test if incoming keys match.
|
|
13
|
-
* @inner
|
|
14
|
-
* @memberOf module:objectHelpers
|
|
15
|
-
* @param {Array.<DotNotationString>} [retainObjects=[]] - An array of keys to retain as objects
|
|
16
|
-
* @returns {Function} The dot-notated array
|
|
17
|
-
*/
|
|
18
|
-
const handleRetainObjects = (retainObjects = []) => {
|
|
19
|
-
if (!retainObjects.length) {
|
|
20
|
-
/**
|
|
21
|
-
* Bypass the test function if there are no retainObjects.
|
|
22
|
-
* @returns {false}
|
|
23
|
-
*/
|
|
24
|
-
return (currentKey, value, results) => false
|
|
25
|
-
}
|
|
26
|
-
retainObjects = retainObjects.map(key => key.replace('\.', '\\.'))
|
|
27
|
-
const retainRegex = new RegExp(`(${retainObjects.join('|')})$`)
|
|
28
|
-
/**
|
|
29
|
-
* Test if a key should be retained as an object.
|
|
30
|
-
* @param {string} currentKey - The key to test
|
|
31
|
-
* @param {*} value - The value of the key
|
|
32
|
-
* @param {Object} results - The results object to add to
|
|
33
|
-
* @returns {boolean}
|
|
34
|
-
*/
|
|
35
|
-
return (currentKey, value, results) => {
|
|
36
|
-
if (!currentKey.match(retainRegex)) {
|
|
37
|
-
return false
|
|
38
|
-
}
|
|
39
|
-
// @ts-ignore
|
|
40
|
-
results[currentKey] = value
|
|
41
|
-
return true
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* The underlying logic function for converting arrays to dot-notation.
|
|
46
|
-
* @inner
|
|
47
|
-
* @memberOf module:objectHelpers
|
|
48
|
-
* @param {Object} arrayObject - The array or object to dot-notate
|
|
49
|
-
* @param {Function} didRetain - The test function to see if a key should be retained
|
|
50
|
-
* @param {DotNotationString} [prepend=''] - The path for the property being processed
|
|
51
|
-
* @param {DotNotatedObject} [results={}] - The final array to return
|
|
52
|
-
* @returns {DotNotatedObject} The dot-notated object
|
|
53
|
-
*/
|
|
54
|
-
const performDotNotate = (arrayObject, didRetain, prepend = '', results = {}) => {
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
for (const key in arrayObject) {
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
const value = arrayObject[key]
|
|
59
|
-
const currentKey = `${prepend}${key}`
|
|
60
|
-
if (didRetain(currentKey, value, results)) {
|
|
61
|
-
continue
|
|
62
|
-
}
|
|
63
|
-
if ((0, _isObject.default)(value)) {
|
|
64
|
-
performDotNotate(value, didRetain, `${currentKey}.`, results)
|
|
65
|
-
continue
|
|
66
|
-
}
|
|
67
|
-
results[currentKey] = value
|
|
68
|
-
}
|
|
69
|
-
return results
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Convert an array or object to a single dimensional associative array with dot notation.
|
|
73
|
-
* @memberOf module:objectHelpers
|
|
74
|
-
* @param {Object} arrayObject - The array or object to dot-notate
|
|
75
|
-
* @param {Array.<DotNotationString>} [retainObjects=[]] - An array of keys to retain as objects
|
|
76
|
-
* @returns {DotNotatedObject} The dot-notated object
|
|
77
|
-
*/
|
|
78
|
-
const dotNotate = (arrayObject, retainObjects = []) => performDotNotate(arrayObject, handleRetainObjects(retainObjects))
|
|
79
|
-
const _default = exports.default = dotNotate
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
require('core-js/modules/esnext.iterator.constructor.js')
|
|
8
|
+
require('core-js/modules/esnext.iterator.map.js')
|
|
9
|
+
const _isObject = _interopRequireDefault(require('./isObject'))
|
|
10
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
11
|
+
/**
|
|
12
|
+
* Convert an array of keys into a regex, return a function to test if incoming keys match.
|
|
13
|
+
* @inner
|
|
14
|
+
* @memberOf module:objectHelpers
|
|
15
|
+
* @param {Array.<DotNotationString>} [retainObjects=[]] - An array of keys to retain as objects
|
|
16
|
+
* @returns {Function} The dot-notated array
|
|
17
|
+
*/
|
|
18
|
+
const handleRetainObjects = (retainObjects = []) => {
|
|
19
|
+
if (!retainObjects.length) {
|
|
20
|
+
/**
|
|
21
|
+
* Bypass the test function if there are no retainObjects.
|
|
22
|
+
* @returns {false}
|
|
23
|
+
*/
|
|
24
|
+
return (currentKey, value, results) => false
|
|
25
|
+
}
|
|
26
|
+
retainObjects = retainObjects.map(key => key.replace('\.', '\\.'))
|
|
27
|
+
const retainRegex = new RegExp(`(${retainObjects.join('|')})$`)
|
|
28
|
+
/**
|
|
29
|
+
* Test if a key should be retained as an object.
|
|
30
|
+
* @param {string} currentKey - The key to test
|
|
31
|
+
* @param {*} value - The value of the key
|
|
32
|
+
* @param {Object} results - The results object to add to
|
|
33
|
+
* @returns {boolean}
|
|
34
|
+
*/
|
|
35
|
+
return (currentKey, value, results) => {
|
|
36
|
+
if (!currentKey.match(retainRegex)) {
|
|
37
|
+
return false
|
|
38
|
+
}
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
results[currentKey] = value
|
|
41
|
+
return true
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The underlying logic function for converting arrays to dot-notation.
|
|
46
|
+
* @inner
|
|
47
|
+
* @memberOf module:objectHelpers
|
|
48
|
+
* @param {Object} arrayObject - The array or object to dot-notate
|
|
49
|
+
* @param {Function} didRetain - The test function to see if a key should be retained
|
|
50
|
+
* @param {DotNotationString} [prepend=''] - The path for the property being processed
|
|
51
|
+
* @param {DotNotatedObject} [results={}] - The final array to return
|
|
52
|
+
* @returns {DotNotatedObject} The dot-notated object
|
|
53
|
+
*/
|
|
54
|
+
const performDotNotate = (arrayObject, didRetain, prepend = '', results = {}) => {
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
for (const key in arrayObject) {
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
const value = arrayObject[key]
|
|
59
|
+
const currentKey = `${prepend}${key}`
|
|
60
|
+
if (didRetain(currentKey, value, results)) {
|
|
61
|
+
continue
|
|
62
|
+
}
|
|
63
|
+
if ((0, _isObject.default)(value)) {
|
|
64
|
+
performDotNotate(value, didRetain, `${currentKey}.`, results)
|
|
65
|
+
continue
|
|
66
|
+
}
|
|
67
|
+
results[currentKey] = value
|
|
68
|
+
}
|
|
69
|
+
return results
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Convert an array or object to a single dimensional associative array with dot notation.
|
|
73
|
+
* @memberOf module:objectHelpers
|
|
74
|
+
* @param {Object} arrayObject - The array or object to dot-notate
|
|
75
|
+
* @param {Array.<DotNotationString>} [retainObjects=[]] - An array of keys to retain as objects
|
|
76
|
+
* @returns {DotNotatedObject} The dot-notated object
|
|
77
|
+
*/
|
|
78
|
+
const dotNotate = (arrayObject, retainObjects = []) => performDotNotate(arrayObject, handleRetainObjects(retainObjects))
|
|
79
|
+
const _default = exports.default = dotNotate
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { dotNotateableItem, dotNotationString } from './dotNotate';
|
|
2
|
-
/**
|
|
3
|
-
* Set a nested property value an object.
|
|
4
|
-
* @memberOf module:objectHelpers
|
|
5
|
-
* @param {Object} arrayObject - The array or object to set the property on
|
|
6
|
-
* @param {string} dotNotation - The path for the property
|
|
7
|
-
* @param {*} value - The default value to return if the property is not found
|
|
8
|
-
* @returns {Object} The modified object
|
|
9
|
-
*/
|
|
10
|
-
declare const dotSet: (arrayObject: dotNotateableItem, dotNotation: dotNotationString, value?: any) => dotNotateableItem;
|
|
11
|
-
export default dotSet;
|
|
1
|
+
import { dotNotateableItem, dotNotationString } from './dotNotate';
|
|
2
|
+
/**
|
|
3
|
+
* Set a nested property value an object.
|
|
4
|
+
* @memberOf module:objectHelpers
|
|
5
|
+
* @param {Object} arrayObject - The array or object to set the property on
|
|
6
|
+
* @param {string} dotNotation - The path for the property
|
|
7
|
+
* @param {*} value - The default value to return if the property is not found
|
|
8
|
+
* @returns {Object} The modified object
|
|
9
|
+
*/
|
|
10
|
+
declare const dotSet: (arrayObject: dotNotateableItem, dotNotation: dotNotationString, value?: any) => dotNotateableItem;
|
|
11
|
+
export default dotSet;
|
|
12
12
|
//# sourceMappingURL=dotSet.d.ts.map
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
const _isObject = _interopRequireDefault(require('./isObject'))
|
|
8
|
-
const _strAfter = _interopRequireDefault(require('../strings/strAfter'))
|
|
9
|
-
const _strBefore = _interopRequireDefault(require('../strings/strBefore'))
|
|
10
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
11
|
-
/**
|
|
12
|
-
* Set a nested property value an object.
|
|
13
|
-
* @memberOf module:objectHelpers
|
|
14
|
-
* @param {Object} arrayObject - The array or object to set the property on
|
|
15
|
-
* @param {string} dotNotation - The path for the property
|
|
16
|
-
* @param {*} value - The default value to return if the property is not found
|
|
17
|
-
* @returns {Object} The modified object
|
|
18
|
-
*/
|
|
19
|
-
const dotSet = (arrayObject, dotNotation, value = null) => {
|
|
20
|
-
let _a
|
|
21
|
-
let key = (0, _strBefore.default)(dotNotation, '.')
|
|
22
|
-
const lastKey = !key
|
|
23
|
-
if (lastKey) {
|
|
24
|
-
key = dotNotation
|
|
25
|
-
}
|
|
26
|
-
if (key === '*') {
|
|
27
|
-
for (const wildKey in arrayObject) {
|
|
28
|
-
if (lastKey) {
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
arrayObject[wildKey] = value
|
|
31
|
-
continue
|
|
32
|
-
}
|
|
33
|
-
// @ts-ignore
|
|
34
|
-
if (!(0, _isObject.default)(arrayObject[wildKey])) {
|
|
35
|
-
continue
|
|
36
|
-
}
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
dotSet(arrayObject[wildKey], (0, _strAfter.default)(dotNotation, '.'), value)
|
|
39
|
-
}
|
|
40
|
-
return arrayObject
|
|
41
|
-
}
|
|
42
|
-
if (lastKey) {
|
|
43
|
-
// @ts-ignore
|
|
44
|
-
arrayObject[dotNotation] = value
|
|
45
|
-
return arrayObject
|
|
46
|
-
}
|
|
47
|
-
// @ts-ignore
|
|
48
|
-
const next = (_a = arrayObject[key]) !== null && _a !== void 0 ? _a : []
|
|
49
|
-
// @ts-ignore
|
|
50
|
-
arrayObject[key] = dotSet(next, (0, _strAfter.default)(dotNotation, '.'), value)
|
|
51
|
-
return arrayObject
|
|
52
|
-
}
|
|
53
|
-
const _default = exports.default = dotSet
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
const _isObject = _interopRequireDefault(require('./isObject'))
|
|
8
|
+
const _strAfter = _interopRequireDefault(require('../strings/strAfter'))
|
|
9
|
+
const _strBefore = _interopRequireDefault(require('../strings/strBefore'))
|
|
10
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
11
|
+
/**
|
|
12
|
+
* Set a nested property value an object.
|
|
13
|
+
* @memberOf module:objectHelpers
|
|
14
|
+
* @param {Object} arrayObject - The array or object to set the property on
|
|
15
|
+
* @param {string} dotNotation - The path for the property
|
|
16
|
+
* @param {*} value - The default value to return if the property is not found
|
|
17
|
+
* @returns {Object} The modified object
|
|
18
|
+
*/
|
|
19
|
+
const dotSet = (arrayObject, dotNotation, value = null) => {
|
|
20
|
+
let _a
|
|
21
|
+
let key = (0, _strBefore.default)(dotNotation, '.')
|
|
22
|
+
const lastKey = !key
|
|
23
|
+
if (lastKey) {
|
|
24
|
+
key = dotNotation
|
|
25
|
+
}
|
|
26
|
+
if (key === '*') {
|
|
27
|
+
for (const wildKey in arrayObject) {
|
|
28
|
+
if (lastKey) {
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
arrayObject[wildKey] = value
|
|
31
|
+
continue
|
|
32
|
+
}
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
if (!(0, _isObject.default)(arrayObject[wildKey])) {
|
|
35
|
+
continue
|
|
36
|
+
}
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
dotSet(arrayObject[wildKey], (0, _strAfter.default)(dotNotation, '.'), value)
|
|
39
|
+
}
|
|
40
|
+
return arrayObject
|
|
41
|
+
}
|
|
42
|
+
if (lastKey) {
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
arrayObject[dotNotation] = value
|
|
45
|
+
return arrayObject
|
|
46
|
+
}
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
const next = (_a = arrayObject[key]) !== null && _a !== void 0 ? _a : []
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
arrayObject[key] = dotSet(next, (0, _strAfter.default)(dotNotation, '.'), value)
|
|
51
|
+
return arrayObject
|
|
52
|
+
}
|
|
53
|
+
const _default = exports.default = dotSet
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { dotNotateableItem, dotNotationString } from './dotNotate';
|
|
2
|
-
/**
|
|
3
|
-
* Unset a nested property value an object.
|
|
4
|
-
* @memberOf module:objectHelpers
|
|
5
|
-
* @param {Object} arrayObject - The array or object to set the property on
|
|
6
|
-
* @param {string} dotNotation - The path for the property
|
|
7
|
-
* @returns {Object} The modified object
|
|
8
|
-
*/
|
|
9
|
-
declare const dotUnset: (arrayObject: dotNotateableItem, dotNotation: dotNotationString) => dotNotateableItem;
|
|
10
|
-
export default dotUnset;
|
|
1
|
+
import { dotNotateableItem, dotNotationString } from './dotNotate';
|
|
2
|
+
/**
|
|
3
|
+
* Unset a nested property value an object.
|
|
4
|
+
* @memberOf module:objectHelpers
|
|
5
|
+
* @param {Object} arrayObject - The array or object to set the property on
|
|
6
|
+
* @param {string} dotNotation - The path for the property
|
|
7
|
+
* @returns {Object} The modified object
|
|
8
|
+
*/
|
|
9
|
+
declare const dotUnset: (arrayObject: dotNotateableItem, dotNotation: dotNotationString) => dotNotateableItem;
|
|
10
|
+
export default dotUnset;
|
|
11
11
|
//# sourceMappingURL=dotUnset.d.ts.map
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
const _isObject = _interopRequireDefault(require('./isObject'))
|
|
8
|
-
const _strAfter = _interopRequireDefault(require('../strings/strAfter'))
|
|
9
|
-
const _strBefore = _interopRequireDefault(require('../strings/strBefore'))
|
|
10
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
11
|
-
/**
|
|
12
|
-
* Unset a nested property value an object.
|
|
13
|
-
* @memberOf module:objectHelpers
|
|
14
|
-
* @param {Object} arrayObject - The array or object to set the property on
|
|
15
|
-
* @param {string} dotNotation - The path for the property
|
|
16
|
-
* @returns {Object} The modified object
|
|
17
|
-
*/
|
|
18
|
-
const dotUnset = (arrayObject, dotNotation) => {
|
|
19
|
-
let _a
|
|
20
|
-
let key = (0, _strBefore.default)(dotNotation, '.')
|
|
21
|
-
const lastKey = !key
|
|
22
|
-
if (lastKey) {
|
|
23
|
-
key = dotNotation
|
|
24
|
-
}
|
|
25
|
-
if (key === '*') {
|
|
26
|
-
for (const wildKey in arrayObject) {
|
|
27
|
-
if (lastKey) {
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
delete arrayObject[wildKey]
|
|
30
|
-
continue
|
|
31
|
-
}
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
if (!(0, _isObject.default)(arrayObject[wildKey])) {
|
|
34
|
-
continue
|
|
35
|
-
}
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
dotUnset(arrayObject[wildKey], (0, _strAfter.default)(dotNotation, '.'))
|
|
38
|
-
}
|
|
39
|
-
return arrayObject
|
|
40
|
-
}
|
|
41
|
-
if (lastKey) {
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
delete arrayObject[dotNotation]
|
|
44
|
-
return arrayObject
|
|
45
|
-
}
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
const next = (_a = arrayObject[key]) !== null && _a !== void 0 ? _a : []
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
arrayObject[key] = dotUnset(next, (0, _strAfter.default)(dotNotation, '.'))
|
|
50
|
-
return arrayObject
|
|
51
|
-
}
|
|
52
|
-
const _default = exports.default = dotUnset
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
const _isObject = _interopRequireDefault(require('./isObject'))
|
|
8
|
+
const _strAfter = _interopRequireDefault(require('../strings/strAfter'))
|
|
9
|
+
const _strBefore = _interopRequireDefault(require('../strings/strBefore'))
|
|
10
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
11
|
+
/**
|
|
12
|
+
* Unset a nested property value an object.
|
|
13
|
+
* @memberOf module:objectHelpers
|
|
14
|
+
* @param {Object} arrayObject - The array or object to set the property on
|
|
15
|
+
* @param {string} dotNotation - The path for the property
|
|
16
|
+
* @returns {Object} The modified object
|
|
17
|
+
*/
|
|
18
|
+
const dotUnset = (arrayObject, dotNotation) => {
|
|
19
|
+
let _a
|
|
20
|
+
let key = (0, _strBefore.default)(dotNotation, '.')
|
|
21
|
+
const lastKey = !key
|
|
22
|
+
if (lastKey) {
|
|
23
|
+
key = dotNotation
|
|
24
|
+
}
|
|
25
|
+
if (key === '*') {
|
|
26
|
+
for (const wildKey in arrayObject) {
|
|
27
|
+
if (lastKey) {
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
delete arrayObject[wildKey]
|
|
30
|
+
continue
|
|
31
|
+
}
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
if (!(0, _isObject.default)(arrayObject[wildKey])) {
|
|
34
|
+
continue
|
|
35
|
+
}
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
dotUnset(arrayObject[wildKey], (0, _strAfter.default)(dotNotation, '.'))
|
|
38
|
+
}
|
|
39
|
+
return arrayObject
|
|
40
|
+
}
|
|
41
|
+
if (lastKey) {
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
delete arrayObject[dotNotation]
|
|
44
|
+
return arrayObject
|
|
45
|
+
}
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
const next = (_a = arrayObject[key]) !== null && _a !== void 0 ? _a : []
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
arrayObject[key] = dotUnset(next, (0, _strAfter.default)(dotNotation, '.'))
|
|
50
|
+
return arrayObject
|
|
51
|
+
}
|
|
52
|
+
const _default = exports.default = dotUnset
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Helper function for testing if the item is an Object or Array that does not have any properties
|
|
3
|
-
* @memberOf module:objectHelpers
|
|
4
|
-
* @param {Object|Array} item - Object or Array to test
|
|
5
|
-
* @returns {boolean}
|
|
6
|
-
*/
|
|
7
|
-
declare const emptyObject: (item: Array<any> | Object) => boolean;
|
|
8
|
-
export default emptyObject;
|
|
1
|
+
/**
|
|
2
|
+
* Helper function for testing if the item is an Object or Array that does not have any properties
|
|
3
|
+
* @memberOf module:objectHelpers
|
|
4
|
+
* @param {Object|Array} item - Object or Array to test
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
declare const emptyObject: (item: Array<any> | Object) => boolean;
|
|
8
|
+
export default emptyObject;
|
|
9
9
|
//# sourceMappingURL=emptyObject.d.ts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
const _isObject = _interopRequireDefault(require('./isObject'))
|
|
8
|
-
const _objectKeys = _interopRequireDefault(require('./objectKeys'))
|
|
9
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
10
|
-
/**
|
|
11
|
-
* Helper function for testing if the item is an Object or Array that does not have any properties
|
|
12
|
-
* @memberOf module:objectHelpers
|
|
13
|
-
* @param {Object|Array} item - Object or Array to test
|
|
14
|
-
* @returns {boolean}
|
|
15
|
-
*/
|
|
16
|
-
const emptyObject = item => (typeof item === 'function' || (0, _isObject.default)(item)) && !(0, _objectKeys.default)(item).length
|
|
17
|
-
const _default = exports.default = emptyObject
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
const _isObject = _interopRequireDefault(require('./isObject'))
|
|
8
|
+
const _objectKeys = _interopRequireDefault(require('./objectKeys'))
|
|
9
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
10
|
+
/**
|
|
11
|
+
* Helper function for testing if the item is an Object or Array that does not have any properties
|
|
12
|
+
* @memberOf module:objectHelpers
|
|
13
|
+
* @param {Object|Array} item - Object or Array to test
|
|
14
|
+
* @returns {boolean}
|
|
15
|
+
*/
|
|
16
|
+
const emptyObject = item => (typeof item === 'function' || (0, _isObject.default)(item)) && !(0, _objectKeys.default)(item).length
|
|
17
|
+
const _default = exports.default = emptyObject
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
type filterableItem = Array<any> | {
|
|
2
|
-
[k: number | string]: any;
|
|
3
|
-
};
|
|
4
|
-
/**
|
|
5
|
-
* Function is a predicate, to test each property value of the object. Return true to keep the element, false
|
|
6
|
-
* otherwise, taking three arguments
|
|
7
|
-
* @callback module:objectHelpers~filterCallback
|
|
8
|
-
* @memberOf module:objectHelpers
|
|
9
|
-
* @param {*} currentProperty - The current property being processed in the object.
|
|
10
|
-
* @param {string} [currentIndex] - The property name of the current property being processed in the object.
|
|
11
|
-
* @param {Object|Array} [object] - The object filter was called upon.
|
|
12
|
-
* @returns {boolean}
|
|
13
|
-
*/
|
|
14
|
-
type filterCallback = (currentProperty: any, currentIndex: keyof filterableItem, object: filterableItem) => boolean;
|
|
15
|
-
/**
|
|
16
|
-
* This function is intended to replicate behaviour of the Array.filter() function but for Objects.
|
|
17
|
-
* If an array is passed in instead then it will perform standard filter(). It is recommended to
|
|
18
|
-
* always use the standard filter() function when it is known that the object is actually an array.
|
|
19
|
-
* @memberOf module:objectHelpers
|
|
20
|
-
* @param {Object|Array} obj - The Object (or Array) to be filtered
|
|
21
|
-
* @param {module:objectHelpers~filterCallback|Function} fn - The function to be processed for each filtered property
|
|
22
|
-
* @param {Object|Array} [thisArg] - Optional. Value to use as this when executing callback.
|
|
23
|
-
* @returns {Object|Array}
|
|
24
|
-
*/
|
|
25
|
-
declare const filterObject: (obj: filterableItem, fn: filterCallback, thisArg?: filterableItem) => filterableItem;
|
|
26
|
-
export default filterObject;
|
|
1
|
+
type filterableItem = Array<any> | {
|
|
2
|
+
[k: number | string]: any;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Function is a predicate, to test each property value of the object. Return true to keep the element, false
|
|
6
|
+
* otherwise, taking three arguments
|
|
7
|
+
* @callback module:objectHelpers~filterCallback
|
|
8
|
+
* @memberOf module:objectHelpers
|
|
9
|
+
* @param {*} currentProperty - The current property being processed in the object.
|
|
10
|
+
* @param {string} [currentIndex] - The property name of the current property being processed in the object.
|
|
11
|
+
* @param {Object|Array} [object] - The object filter was called upon.
|
|
12
|
+
* @returns {boolean}
|
|
13
|
+
*/
|
|
14
|
+
type filterCallback = (currentProperty: any, currentIndex: keyof filterableItem, object: filterableItem) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* This function is intended to replicate behaviour of the Array.filter() function but for Objects.
|
|
17
|
+
* If an array is passed in instead then it will perform standard filter(). It is recommended to
|
|
18
|
+
* always use the standard filter() function when it is known that the object is actually an array.
|
|
19
|
+
* @memberOf module:objectHelpers
|
|
20
|
+
* @param {Object|Array} obj - The Object (or Array) to be filtered
|
|
21
|
+
* @param {module:objectHelpers~filterCallback|Function} fn - The function to be processed for each filtered property
|
|
22
|
+
* @param {Object|Array} [thisArg] - Optional. Value to use as this when executing callback.
|
|
23
|
+
* @returns {Object|Array}
|
|
24
|
+
*/
|
|
25
|
+
declare const filterObject: (obj: filterableItem, fn: filterCallback, thisArg?: filterableItem) => filterableItem;
|
|
26
|
+
export default filterObject;
|
|
27
27
|
//# sourceMappingURL=filterObject.d.ts.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
require('core-js/modules/esnext.iterator.constructor.js')
|
|
8
|
-
require('core-js/modules/esnext.iterator.filter.js')
|
|
9
|
-
require('core-js/modules/esnext.iterator.reduce.js')
|
|
10
|
-
const _callWithParams = _interopRequireDefault(require('../functions/callWithParams'))
|
|
11
|
-
const _objectKeys = _interopRequireDefault(require('./objectKeys'))
|
|
12
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
13
|
-
/**
|
|
14
|
-
* This function is intended to replicate behaviour of the Array.filter() function but for Objects.
|
|
15
|
-
* If an array is passed in instead then it will perform standard filter(). It is recommended to
|
|
16
|
-
* always use the standard filter() function when it is known that the object is actually an array.
|
|
17
|
-
* @memberOf module:objectHelpers
|
|
18
|
-
* @param {Object|Array} obj - The Object (or Array) to be filtered
|
|
19
|
-
* @param {module:objectHelpers~filterCallback|Function} fn - The function to be processed for each filtered property
|
|
20
|
-
* @param {Object|Array} [thisArg] - Optional. Value to use as this when executing callback.
|
|
21
|
-
* @returns {Object|Array}
|
|
22
|
-
*/
|
|
23
|
-
const filterObject = (obj, fn, thisArg = undefined) => Array.isArray(obj)
|
|
24
|
-
? obj.filter(fn, thisArg)
|
|
25
|
-
: (0, _objectKeys.default)(obj, true).reduce((newObj, curr) => {
|
|
26
|
-
if ((0, _callWithParams.default)(fn.bind(thisArg), [obj[curr], curr, obj], 2)) {
|
|
27
|
-
newObj[curr] = obj[curr]
|
|
28
|
-
} else {
|
|
29
|
-
delete newObj[curr]
|
|
30
|
-
}
|
|
31
|
-
return newObj
|
|
32
|
-
}, {})
|
|
33
|
-
const _default = exports.default = filterObject
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
require('core-js/modules/esnext.iterator.constructor.js')
|
|
8
|
+
require('core-js/modules/esnext.iterator.filter.js')
|
|
9
|
+
require('core-js/modules/esnext.iterator.reduce.js')
|
|
10
|
+
const _callWithParams = _interopRequireDefault(require('../functions/callWithParams'))
|
|
11
|
+
const _objectKeys = _interopRequireDefault(require('./objectKeys'))
|
|
12
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
13
|
+
/**
|
|
14
|
+
* This function is intended to replicate behaviour of the Array.filter() function but for Objects.
|
|
15
|
+
* If an array is passed in instead then it will perform standard filter(). It is recommended to
|
|
16
|
+
* always use the standard filter() function when it is known that the object is actually an array.
|
|
17
|
+
* @memberOf module:objectHelpers
|
|
18
|
+
* @param {Object|Array} obj - The Object (or Array) to be filtered
|
|
19
|
+
* @param {module:objectHelpers~filterCallback|Function} fn - The function to be processed for each filtered property
|
|
20
|
+
* @param {Object|Array} [thisArg] - Optional. Value to use as this when executing callback.
|
|
21
|
+
* @returns {Object|Array}
|
|
22
|
+
*/
|
|
23
|
+
const filterObject = (obj, fn, thisArg = undefined) => Array.isArray(obj)
|
|
24
|
+
? obj.filter(fn, thisArg)
|
|
25
|
+
: (0, _objectKeys.default)(obj, true).reduce((newObj, curr) => {
|
|
26
|
+
if ((0, _callWithParams.default)(fn.bind(thisArg), [obj[curr], curr, obj], 2)) {
|
|
27
|
+
newObj[curr] = obj[curr]
|
|
28
|
+
} else {
|
|
29
|
+
delete newObj[curr]
|
|
30
|
+
}
|
|
31
|
+
return newObj
|
|
32
|
+
}, {})
|
|
33
|
+
const _default = exports.default = filterObject
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determine if the value is a reference instance
|
|
3
|
-
* @memberOf module:objectHelpers
|
|
4
|
-
* @param {Array|Object|*} value
|
|
5
|
-
* @returns {boolean}
|
|
6
|
-
*/
|
|
7
|
-
declare const isCloneable: (value: Array<any> | Object | any) => boolean;
|
|
8
|
-
export default isCloneable;
|
|
1
|
+
/**
|
|
2
|
+
* Determine if the value is a reference instance
|
|
3
|
+
* @memberOf module:objectHelpers
|
|
4
|
+
* @param {Array|Object|*} value
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
declare const isCloneable: (value: Array<any> | Object | any) => boolean;
|
|
8
|
+
export default isCloneable;
|
|
9
9
|
//# sourceMappingURL=isCloneable.d.ts.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
const _isInstanceObject = _interopRequireDefault(require('./isInstanceObject'))
|
|
8
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
9
|
-
/**
|
|
10
|
-
* Determine if the value is a reference instance
|
|
11
|
-
* @memberOf module:objectHelpers
|
|
12
|
-
* @param {Array|Object|*} value
|
|
13
|
-
* @returns {boolean}
|
|
14
|
-
*/
|
|
15
|
-
const isCloneable = value => typeof value === 'object' && value !== null && !(0, _isInstanceObject.default)(value)
|
|
16
|
-
const _default = exports.default = isCloneable
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
const _isInstanceObject = _interopRequireDefault(require('./isInstanceObject'))
|
|
8
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
9
|
+
/**
|
|
10
|
+
* Determine if the value is a reference instance
|
|
11
|
+
* @memberOf module:objectHelpers
|
|
12
|
+
* @param {Array|Object|*} value
|
|
13
|
+
* @returns {boolean}
|
|
14
|
+
*/
|
|
15
|
+
const isCloneable = value => typeof value === 'object' && value !== null && !(0, _isInstanceObject.default)(value)
|
|
16
|
+
const _default = exports.default = isCloneable
|