si-funciona 2.3.2 → 2.3.4
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 +1337 -1244
- package/browser/siFunciona.js +24205 -24282
- package/browser/siFunciona.min.js +1 -1
- package/dist/helpers/arrays/BasicQueue.d.ts +66 -61
- package/dist/helpers/arrays/BasicQueue.js +62 -60
- package/dist/helpers/arrays/BasicQueue.min.js +1 -1
- package/dist/helpers/arrays/addUniqueToArray.d.ts +1 -0
- package/dist/helpers/arrays/buildArray.d.ts +1 -0
- package/dist/helpers/arrays/buildArrayOfReferences.d.ts +1 -0
- package/dist/helpers/arrays/compareArrays.d.ts +1 -0
- package/dist/helpers/arrays/compareArrays.js +24 -30
- package/dist/helpers/arrays/compareArrays.min.js +1 -1
- package/dist/helpers/arrays/mergeArrays.d.ts +1 -0
- package/dist/helpers/arrays/mergeArrays.js +2 -7
- package/dist/helpers/arrays/mergeArrays.min.js +1 -1
- package/dist/helpers/arrays/uniqueArray.d.ts +1 -0
- package/dist/helpers/arrays.d.ts +22 -20
- package/dist/helpers/arrays.js +33 -32
- package/dist/helpers/descriptors/assignDescriptor.d.ts +15 -11
- package/dist/helpers/descriptors/assignDescriptor.js +58 -60
- package/dist/helpers/descriptors/assignDescriptor.min.js +1 -1
- package/dist/helpers/descriptors/assignDescriptorDetail.d.ts +15 -11
- package/dist/helpers/descriptors/assignDescriptorDetail.js +37 -38
- package/dist/helpers/descriptors/assignDescriptorDetail.min.js +1 -1
- package/dist/helpers/descriptors/checkClearValues.d.ts +13 -11
- package/dist/helpers/descriptors/checkClearValues.js +21 -23
- package/dist/helpers/descriptors/checkClearValues.min.js +1 -1
- package/dist/helpers/descriptors/checkDescriptorComplete.d.ts +12 -10
- package/dist/helpers/descriptors/checkDescriptorComplete.js +20 -19
- package/dist/helpers/descriptors/cloneDescriptor.d.ts +11 -10
- package/dist/helpers/descriptors/cloneDescriptor.js +36 -37
- package/dist/helpers/descriptors/cloneDescriptor.min.js +1 -1
- package/dist/helpers/descriptors/cloneDescriptorDetail.d.ts +11 -10
- package/dist/helpers/descriptors/cloneDescriptorDetail.js +27 -27
- package/dist/helpers/descriptors/compareDescriptor.d.ts +14 -11
- package/dist/helpers/descriptors/compareDescriptor.js +33 -32
- package/dist/helpers/descriptors/compareDescriptor.min.js +1 -1
- package/dist/helpers/descriptors/describeObject.d.ts +16 -13
- package/dist/helpers/descriptors/describeObject.js +53 -51
- package/dist/helpers/descriptors/describeObjectDetail.d.ts +15 -12
- package/dist/helpers/descriptors/describeObjectDetail.js +38 -38
- package/dist/helpers/descriptors/describeObjectDetail.min.js +1 -1
- package/dist/helpers/descriptors/describeObjectMap.d.ts +37 -20
- package/dist/helpers/descriptors/describeObjectMap.js +108 -97
- package/dist/helpers/descriptors/describeObjectMap.min.js +1 -1
- package/dist/helpers/descriptors/nextReference.d.ts +14 -11
- package/dist/helpers/descriptors/nextReference.js +31 -29
- package/dist/helpers/descriptors/sameDescriptor.d.ts +14 -11
- package/dist/helpers/descriptors/sameDescriptor.js +22 -20
- package/dist/helpers/descriptors/samples/descriptor.d.ts +35 -27
- package/dist/helpers/descriptors/samples/descriptorDetail.d.ts +43 -34
- package/dist/helpers/descriptors/samples/descriptorMap.d.ts +17 -12
- package/dist/helpers/descriptors/samples/mappedDescriptorMap.d.ts +11 -7
- package/dist/helpers/descriptors/samples/mappedDescriptorMap.js +287 -284
- package/dist/helpers/descriptors.d.ts +45 -28
- package/dist/helpers/descriptors.js +58 -42
- package/dist/helpers/functions/callWithParams.d.ts +1 -0
- package/dist/helpers/functions/callWithParams.js +1 -6
- package/dist/helpers/functions/callWithParams.min.js +1 -1
- package/dist/helpers/functions/curry.d.ts +1 -0
- package/dist/helpers/functions/curry.js +1 -12
- package/dist/helpers/functions/curry.min.js +1 -1
- package/dist/helpers/functions/delay.d.ts +1 -0
- package/dist/helpers/functions/delay.js +4 -5
- package/dist/helpers/functions/delay.min.js +1 -1
- package/dist/helpers/functions/makeBasicQueue.d.ts +11 -10
- package/dist/helpers/functions/makeBasicQueue.js +19 -20
- package/dist/helpers/functions/makeBasicQueue.min.js +1 -1
- package/dist/helpers/functions/onBodyLoad.d.ts +1 -0
- package/dist/helpers/functions/onBodyLoad.js +1 -2
- package/dist/helpers/functions/onBodyLoad.min.js +1 -1
- package/dist/helpers/functions/pipe.d.ts +1 -0
- package/dist/helpers/functions/pipe.js +3 -6
- package/dist/helpers/functions/pipe.min.js +1 -1
- package/dist/helpers/functions/preloadParams.d.ts +1 -0
- package/dist/helpers/functions/preloadParams.js +3 -8
- package/dist/helpers/functions/preloadParams.min.js +1 -1
- package/dist/helpers/functions/queueManager.d.ts +50 -47
- package/dist/helpers/functions/queueManager.js +124 -132
- package/dist/helpers/functions/queueManager.min.js +1 -1
- package/dist/helpers/functions/queueTimeout.d.ts +1 -0
- package/dist/helpers/functions/queueTimeout.js +2 -10
- package/dist/helpers/functions/queueTimeout.min.js +1 -1
- package/dist/helpers/functions/relevancyFilter.d.ts +36 -35
- package/dist/helpers/functions/relevancyFilter.js +34 -36
- package/dist/helpers/functions/relevancyFilter.min.js +1 -1
- package/dist/helpers/functions/trace.d.ts +15 -12
- package/dist/helpers/functions/trace.js +25 -26
- package/dist/helpers/functions/trace.min.js +1 -1
- package/dist/helpers/functions.d.ts +1 -0
- package/dist/helpers/numbers/absoluteMax.d.ts +1 -0
- package/dist/helpers/numbers/absoluteMin.d.ts +1 -0
- package/dist/helpers/numbers/compare.d.ts +1 -0
- package/dist/helpers/numbers/greatestCommonDivisor.d.ts +1 -0
- package/dist/helpers/numbers/leastCommonMultiple.d.ts +1 -0
- package/dist/helpers/numbers/lowestCommonDenominator.d.ts +11 -10
- package/dist/helpers/numbers/lowestCommonDenominator.js +20 -23
- package/dist/helpers/numbers/lowestCommonDenominator.min.js +1 -1
- package/dist/helpers/numbers/randomInteger.d.ts +1 -0
- package/dist/helpers/numbers/randomInteger.js +1 -5
- package/dist/helpers/numbers/randomInteger.min.js +1 -1
- package/dist/helpers/numbers/randomNumber.d.ts +1 -0
- package/dist/helpers/numbers/randomNumber.js +1 -5
- package/dist/helpers/numbers/randomNumber.min.js +1 -1
- package/dist/helpers/numbers/simplestRatio.d.ts +1 -0
- package/dist/helpers/numbers/simplestRatio.js +4 -4
- package/dist/helpers/numbers/simplestRatio.min.js +1 -1
- package/dist/helpers/numbers.d.ts +1 -0
- package/dist/helpers/objects/cloneObject.d.ts +1 -0
- package/dist/helpers/objects/cloneObject.js +10 -15
- package/dist/helpers/objects/cloneObject.min.js +1 -1
- package/dist/helpers/objects/dotGet.d.ts +1 -0
- package/dist/helpers/objects/dotGet.js +1 -2
- package/dist/helpers/objects/dotGet.min.js +1 -1
- package/dist/helpers/objects/dotNotate.d.ts +1 -0
- package/dist/helpers/objects/dotNotate.js +6 -15
- package/dist/helpers/objects/dotNotate.min.js +1 -1
- package/dist/helpers/objects/dotSet.d.ts +1 -0
- package/dist/helpers/objects/dotSet.js +1 -2
- package/dist/helpers/objects/dotSet.min.js +1 -1
- package/dist/helpers/objects/dotUnset.d.ts +1 -0
- package/dist/helpers/objects/emptyObject.d.ts +1 -0
- package/dist/helpers/objects/filterObject.d.ts +1 -0
- package/dist/helpers/objects/filterObject.js +8 -11
- package/dist/helpers/objects/filterObject.min.js +1 -1
- package/dist/helpers/objects/isCloneable.d.ts +1 -0
- package/dist/helpers/objects/isInstanceObject.d.ts +1 -0
- package/dist/helpers/objects/isObject.d.ts +1 -0
- package/dist/helpers/objects/mapObject.d.ts +1 -0
- package/dist/helpers/objects/mapObject.js +1 -4
- package/dist/helpers/objects/mapObject.min.js +1 -1
- package/dist/helpers/objects/mergeObjects.d.ts +1 -0
- package/dist/helpers/objects/mergeObjectsBase.d.ts +1 -0
- package/dist/helpers/objects/mergeObjectsBase.js +58 -67
- package/dist/helpers/objects/mergeObjectsBase.min.js +1 -1
- package/dist/helpers/objects/mergeObjectsMutable.d.ts +1 -0
- package/dist/helpers/objects/objectKeys.d.ts +1 -0
- package/dist/helpers/objects/objectKeys.js +1 -2
- package/dist/helpers/objects/objectKeys.min.js +1 -1
- package/dist/helpers/objects/objectValues.d.ts +1 -0
- package/dist/helpers/objects/objectValues.js +1 -4
- package/dist/helpers/objects/objectValues.min.js +1 -1
- package/dist/helpers/objects/reduceObject.d.ts +1 -0
- package/dist/helpers/objects/reduceObject.js +1 -4
- package/dist/helpers/objects/reduceObject.min.js +1 -1
- package/dist/helpers/objects/setAndReturnValue.d.ts +1 -0
- package/dist/helpers/objects/setValue.d.ts +1 -0
- package/dist/helpers/objects.d.ts +5 -4
- package/dist/helpers/strings/camelCase.d.ts +10 -9
- package/dist/helpers/strings/camelCase.js +20 -20
- package/dist/helpers/strings/kabobCase.d.ts +10 -9
- package/dist/helpers/strings/kabobCase.js +19 -19
- package/dist/helpers/strings/makeFilepath.d.ts +10 -9
- package/dist/helpers/strings/makeFilepath.js +49 -50
- package/dist/helpers/strings/makeFilepath.min.js +1 -1
- package/dist/helpers/strings/makeRelativePath.d.ts +10 -9
- package/dist/helpers/strings/makeRelativePath.js +43 -43
- package/dist/helpers/strings/makeRelativePath.min.js +1 -1
- package/dist/helpers/strings/regexEscape.d.ts +9 -8
- package/dist/helpers/strings/regexEscape.js +15 -17
- package/dist/helpers/strings/regexEscape.min.js +1 -1
- package/dist/helpers/strings/snakeCase.d.ts +10 -9
- package/dist/helpers/strings/snakeCase.js +19 -19
- package/dist/helpers/strings/strAfter.d.ts +11 -10
- package/dist/helpers/strings/strAfter.js +19 -19
- package/dist/helpers/strings/strAfterLast.d.ts +11 -10
- package/dist/helpers/strings/strAfterLast.js +19 -19
- package/dist/helpers/strings/strBefore.d.ts +11 -10
- package/dist/helpers/strings/strBefore.js +19 -19
- package/dist/helpers/strings/strBeforeLast.d.ts +11 -10
- package/dist/helpers/strings/strBeforeLast.js +19 -19
- package/dist/helpers/strings/titleCase.d.ts +10 -9
- package/dist/helpers/strings/titleCase.js +20 -20
- package/dist/helpers/strings/ucFirst.d.ts +10 -9
- package/dist/helpers/strings/ucFirst.js +15 -15
- package/dist/helpers/strings/words.d.ts +11 -9
- package/dist/helpers/strings/words.js +16 -16
- package/dist/helpers/strings/words.min.js +1 -1
- package/dist/helpers/strings.d.ts +1 -0
- package/dist/main.d.ts +1 -0
- package/package.json +4 -4
|
@@ -17,8 +17,5 @@ function _interopRequireDefault (e) { return e && e.__esModule ? e : { default:
|
|
|
17
17
|
* @param {boolean} [includeInherited=false]
|
|
18
18
|
* @returns {Array}
|
|
19
19
|
*/
|
|
20
|
-
const objectValues =
|
|
21
|
-
const includeInherited = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false
|
|
22
|
-
return (0, _objectKeys.default)(object, includeInherited).map(key => object[key])
|
|
23
|
-
}
|
|
20
|
+
const objectValues = (object, includeInherited = false) => (0, _objectKeys.default)(object, includeInherited).map(key => object[key])
|
|
24
21
|
var _default = exports.default = objectValues
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,require("core-js/modules/esnext.iterator.constructor.js"),require("core-js/modules/esnext.iterator.map.js"),require("core-js/stable");var _objectKeys=_interopRequireDefault(require("./objectKeys"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const objectValues=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,require("core-js/modules/esnext.iterator.constructor.js"),require("core-js/modules/esnext.iterator.map.js"),require("core-js/stable");var _objectKeys=_interopRequireDefault(require("./objectKeys"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const objectValues=(e,t=!1)=>(0,_objectKeys.default)(e,t).map((t=>e[t]));var _default=exports.default=objectValues;
|
|
@@ -29,3 +29,4 @@ type reduceCallback = (accumulator: any, currentProperty: any, currentIndex: key
|
|
|
29
29
|
*/
|
|
30
30
|
declare const reduceObject: (obj: reduceableItem, fn: reduceCallback, initialValue?: reduceableItem) => any;
|
|
31
31
|
export default reduceObject;
|
|
32
|
+
//# sourceMappingURL=reduceObject.d.ts.map
|
|
@@ -22,8 +22,5 @@ function _interopRequireDefault (e) { return e && e.__esModule ? e : { default:
|
|
|
22
22
|
* array without an initial value is an error.
|
|
23
23
|
* @returns {*}
|
|
24
24
|
*/
|
|
25
|
-
const reduceObject =
|
|
26
|
-
const initialValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : obj[(0, _objectKeys.default)(obj)[0]] || obj[0]
|
|
27
|
-
return Array.isArray(obj) ? obj.reduce(fn, initialValue) : (0, _objectKeys.default)(obj, true).reduce((newObj, curr) => (0, _callWithParams.default)(fn, [newObj, obj[curr], curr, obj], 2), initialValue)
|
|
28
|
-
}
|
|
25
|
+
const reduceObject = (obj, fn, initialValue = obj[(0, _objectKeys.default)(obj)[0]] || obj[0]) => Array.isArray(obj) ? obj.reduce(fn, initialValue) : (0, _objectKeys.default)(obj, true).reduce((newObj, curr) => (0, _callWithParams.default)(fn, [newObj, obj[curr], curr, obj], 2), initialValue)
|
|
29
26
|
var _default = exports.default = reduceObject
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,require("core-js/modules/esnext.iterator.constructor.js"),require("core-js/modules/esnext.iterator.reduce.js"),require("core-js/stable");var _callWithParams=_interopRequireDefault(require("../functions/callWithParams")),_objectKeys=_interopRequireDefault(require("./objectKeys"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const reduceObject=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,require("core-js/modules/esnext.iterator.constructor.js"),require("core-js/modules/esnext.iterator.reduce.js"),require("core-js/stable");var _callWithParams=_interopRequireDefault(require("../functions/callWithParams")),_objectKeys=_interopRequireDefault(require("./objectKeys"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const reduceObject=(e,r,t=e[(0,_objectKeys.default)(e)[0]]||e[0])=>Array.isArray(e)?e.reduce(r,t):(0,_objectKeys.default)(e,!0).reduce(((t,u)=>(0,_callWithParams.default)(r,[t,e[u],u,e],2)),t);var _default=exports.default=reduceObject;
|
|
@@ -23,7 +23,7 @@ declare const _default: {
|
|
|
23
23
|
filterObject: (obj: any[] | {
|
|
24
24
|
[k: string]: any;
|
|
25
25
|
[k: number]: any;
|
|
26
|
-
}, fn: (currentProperty: any, currentIndex: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "
|
|
26
|
+
}, 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[] | {
|
|
27
27
|
[k: string]: any;
|
|
28
28
|
[k: number]: any;
|
|
29
29
|
}) => boolean, thisArg?: any[] | {
|
|
@@ -39,7 +39,7 @@ declare const _default: {
|
|
|
39
39
|
mapObject: (obj: any[] | {
|
|
40
40
|
[k: string]: any;
|
|
41
41
|
[k: number]: any;
|
|
42
|
-
}, fn: (currentProperty: any, currentIndex: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "
|
|
42
|
+
}, 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[] | {
|
|
43
43
|
[k: string]: any;
|
|
44
44
|
[k: number]: any;
|
|
45
45
|
}) => any, thisArg?: any[] | {
|
|
@@ -78,7 +78,7 @@ declare const _default: {
|
|
|
78
78
|
reduceObject: (obj: any[] | {
|
|
79
79
|
[k: string]: any;
|
|
80
80
|
[k: number]: any;
|
|
81
|
-
}, fn: (accumulator: any, currentProperty: any, currentIndex: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "
|
|
81
|
+
}, 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[] | {
|
|
82
82
|
[k: string]: any;
|
|
83
83
|
[k: number]: any;
|
|
84
84
|
}) => any, initialValue?: any[] | {
|
|
@@ -88,7 +88,7 @@ declare const _default: {
|
|
|
88
88
|
setAndReturnValue: (item: any[] | {
|
|
89
89
|
[k: string]: any;
|
|
90
90
|
[k: number]: any;
|
|
91
|
-
}, key: number | "length" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "
|
|
91
|
+
}, 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;
|
|
92
92
|
setValue: (key: number | string, value: any, item: any[] | {
|
|
93
93
|
[k: string]: any;
|
|
94
94
|
[k: number]: any;
|
|
@@ -98,3 +98,4 @@ declare const _default: {
|
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
export default _default;
|
|
101
|
+
//# sourceMappingURL=objects.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import 'core-js/stable';
|
|
2
|
-
/**
|
|
3
|
-
* Given a string in kebab-case, snake_case or 'Sentence case', convert to camelCase.
|
|
4
|
-
* @memberOf module:stringHelpers
|
|
5
|
-
* @param {string} str
|
|
6
|
-
* @returns {string}
|
|
7
|
-
*/
|
|
8
|
-
declare const camelCase: (str: string) => string;
|
|
9
|
-
export default camelCase;
|
|
1
|
+
import 'core-js/stable';
|
|
2
|
+
/**
|
|
3
|
+
* Given a string in kebab-case, snake_case or 'Sentence case', convert to camelCase.
|
|
4
|
+
* @memberOf module:stringHelpers
|
|
5
|
+
* @param {string} str - The string to convert.
|
|
6
|
+
* @returns {string}
|
|
7
|
+
*/
|
|
8
|
+
declare const camelCase: (str: string) => string;
|
|
9
|
+
export default camelCase;
|
|
10
|
+
//# sourceMappingURL=camelCase.d.ts.map
|
|
@@ -1,20 +1,20 @@
|
|
|
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.reduce.js')
|
|
9
|
-
require('core-js/stable')
|
|
10
|
-
var _ucFirst = _interopRequireDefault(require('./ucFirst'))
|
|
11
|
-
var _words = _interopRequireDefault(require('./words'))
|
|
12
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
13
|
-
/**
|
|
14
|
-
* Given a string in kebab-case, snake_case or 'Sentence case', convert to camelCase.
|
|
15
|
-
* @memberOf module:stringHelpers
|
|
16
|
-
* @param {string} str
|
|
17
|
-
* @returns {string}
|
|
18
|
-
*/
|
|
19
|
-
const camelCase = str => (0, _words.default)(str).reduce((camel, part) => camel ? camel.concat((0, _ucFirst.default)(part)) : part.toLowerCase(), '')
|
|
20
|
-
var _default = exports.default = camelCase
|
|
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.reduce.js')
|
|
9
|
+
require('core-js/stable')
|
|
10
|
+
var _ucFirst = _interopRequireDefault(require('./ucFirst'))
|
|
11
|
+
var _words = _interopRequireDefault(require('./words'))
|
|
12
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
13
|
+
/**
|
|
14
|
+
* Given a string in kebab-case, snake_case or 'Sentence case', convert to camelCase.
|
|
15
|
+
* @memberOf module:stringHelpers
|
|
16
|
+
* @param {string} str - The string to convert.
|
|
17
|
+
* @returns {string}
|
|
18
|
+
*/
|
|
19
|
+
const camelCase = str => (0, _words.default)(str).reduce((camel, part) => camel ? camel.concat((0, _ucFirst.default)(part)) : part.toLowerCase(), '')
|
|
20
|
+
var _default = exports.default = camelCase
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import 'core-js/stable';
|
|
2
|
-
/**
|
|
3
|
-
* Given a string in snake_case, camelCase or 'Sentence case', convert to kabob-case.
|
|
4
|
-
* @memberOf module:stringHelpers
|
|
5
|
-
* @param {string} str
|
|
6
|
-
* @returns {string}
|
|
7
|
-
*/
|
|
8
|
-
declare const kabobCase: (str: string) => string;
|
|
9
|
-
export default kabobCase;
|
|
1
|
+
import 'core-js/stable';
|
|
2
|
+
/**
|
|
3
|
+
* Given a string in snake_case, camelCase or 'Sentence case', convert to kabob-case.
|
|
4
|
+
* @memberOf module:stringHelpers
|
|
5
|
+
* @param {string} str - The string to convert.
|
|
6
|
+
* @returns {string}
|
|
7
|
+
*/
|
|
8
|
+
declare const kabobCase: (str: string) => string;
|
|
9
|
+
export default kabobCase;
|
|
10
|
+
//# sourceMappingURL=kabobCase.d.ts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
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.reduce.js')
|
|
9
|
-
require('core-js/stable')
|
|
10
|
-
var _words = _interopRequireDefault(require('./words'))
|
|
11
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
12
|
-
/**
|
|
13
|
-
* Given a string in snake_case, camelCase or 'Sentence case', convert to kabob-case.
|
|
14
|
-
* @memberOf module:stringHelpers
|
|
15
|
-
* @param {string} str
|
|
16
|
-
* @returns {string}
|
|
17
|
-
*/
|
|
18
|
-
const kabobCase = str => (0, _words.default)(str).reduce((kabob, part) => kabob ? kabob.concat('-' + part.toLowerCase()) : part.toLowerCase(), '')
|
|
19
|
-
var _default = exports.default = kabobCase
|
|
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.reduce.js')
|
|
9
|
+
require('core-js/stable')
|
|
10
|
+
var _words = _interopRequireDefault(require('./words'))
|
|
11
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
12
|
+
/**
|
|
13
|
+
* Given a string in snake_case, camelCase or 'Sentence case', convert to kabob-case.
|
|
14
|
+
* @memberOf module:stringHelpers
|
|
15
|
+
* @param {string} str - The string to convert.
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
const kabobCase = str => (0, _words.default)(str).reduce((kabob, part) => kabob ? kabob.concat('-' + part.toLowerCase()) : part.toLowerCase(), '')
|
|
19
|
+
var _default = exports.default = kabobCase
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Format the given path so that it does not have trailing slashes and also correctly appends a path.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} root
|
|
5
|
-
* @param {string} [append='']
|
|
6
|
-
* @returns {string}
|
|
7
|
-
*/
|
|
8
|
-
export declare const makeFilepath: (root: string, append?: string) => string;
|
|
9
|
-
export default makeFilepath;
|
|
1
|
+
/**
|
|
2
|
+
* Format the given path so that it does not have trailing slashes and also correctly appends a path.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} root - The base path to start from.
|
|
5
|
+
* @param {string} [append=''] - A path to append to `root` - may itself use `./` or `../` segments.
|
|
6
|
+
* @returns {string}
|
|
7
|
+
*/
|
|
8
|
+
export declare const makeFilepath: (root: string, append?: string) => string;
|
|
9
|
+
export default makeFilepath;
|
|
10
|
+
//# sourceMappingURL=makeFilepath.d.ts.map
|
|
@@ -1,50 +1,49 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.makeFilepath = exports.default = void 0
|
|
7
|
-
var _strBeforeLast = _interopRequireDefault(require('./strBeforeLast'))
|
|
8
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
9
|
-
/**
|
|
10
|
-
* Format the given path so that it does not have trailing slashes and also correctly appends a path.
|
|
11
|
-
* @memberOf module:stringHelpers
|
|
12
|
-
* @param {string} root
|
|
13
|
-
* @param {string} [append='']
|
|
14
|
-
* @returns {string}
|
|
15
|
-
*/
|
|
16
|
-
const makeFilepath =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
exports.
|
|
50
|
-
var _default = exports.default = makeFilepath
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.makeFilepath = exports.default = void 0
|
|
7
|
+
var _strBeforeLast = _interopRequireDefault(require('./strBeforeLast'))
|
|
8
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
9
|
+
/**
|
|
10
|
+
* Format the given path so that it does not have trailing slashes and also correctly appends a path.
|
|
11
|
+
* @memberOf module:stringHelpers
|
|
12
|
+
* @param {string} root - The base path to start from.
|
|
13
|
+
* @param {string} [append=''] - A path to append to `root` - may itself use `./` or `../` segments.
|
|
14
|
+
* @returns {string}
|
|
15
|
+
*/
|
|
16
|
+
const makeFilepath = (root, append = '') => {
|
|
17
|
+
if (root.startsWith('./')) {
|
|
18
|
+
root = root.slice(2)
|
|
19
|
+
}
|
|
20
|
+
if (root.startsWith('/')) {
|
|
21
|
+
root = root.slice(1)
|
|
22
|
+
}
|
|
23
|
+
if (root.endsWith('/')) {
|
|
24
|
+
root = root.slice(0, -1)
|
|
25
|
+
}
|
|
26
|
+
if (append.startsWith('/')) {
|
|
27
|
+
append = append.slice(1)
|
|
28
|
+
}
|
|
29
|
+
if (append.startsWith('./')) {
|
|
30
|
+
append = append.slice(2)
|
|
31
|
+
}
|
|
32
|
+
if (append.startsWith('../')) {
|
|
33
|
+
if (!root) {
|
|
34
|
+
return append.endsWith('/') ? append.slice(0, -1) : append
|
|
35
|
+
}
|
|
36
|
+
append = append.slice(3)
|
|
37
|
+
root = (0, _strBeforeLast.default)(root, '/')
|
|
38
|
+
return makeFilepath(root, append)
|
|
39
|
+
}
|
|
40
|
+
if (append.endsWith('/')) {
|
|
41
|
+
append = append.slice(0, -1)
|
|
42
|
+
}
|
|
43
|
+
if (!root) {
|
|
44
|
+
return append
|
|
45
|
+
}
|
|
46
|
+
return append ? `${root}/${append}` : root
|
|
47
|
+
}
|
|
48
|
+
exports.makeFilepath = makeFilepath
|
|
49
|
+
var _default = exports.default = makeFilepath
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeFilepath=exports.default=void 0;var _strBeforeLast=_interopRequireDefault(require("./strBeforeLast"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const makeFilepath=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeFilepath=exports.default=void 0;var _strBeforeLast=_interopRequireDefault(require("./strBeforeLast"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const makeFilepath=(e,t="")=>(e.startsWith("./")&&(e=e.slice(2)),e.startsWith("/")&&(e=e.slice(1)),e.endsWith("/")&&(e=e.slice(0,-1)),t.startsWith("/")&&(t=t.slice(1)),t.startsWith("./")&&(t=t.slice(2)),t.startsWith("../")?e?(t=t.slice(3),e=(0,_strBeforeLast.default)(e,"/"),makeFilepath(e,t)):t.endsWith("/")?t.slice(0,-1):t:(t.endsWith("/")&&(t=t.slice(0,-1)),e?t?`${e}/${t}`:e:t));exports.makeFilepath=makeFilepath;var _default=exports.default=makeFilepath;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Compare two file paths and simplify them to a relative path.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} fromFile
|
|
5
|
-
* @param {string} toFile
|
|
6
|
-
* @return {string}
|
|
7
|
-
*/
|
|
8
|
-
export declare const makeRelativePath: (fromFile: string, toFile: string) => string;
|
|
9
|
-
export default makeRelativePath;
|
|
1
|
+
/**
|
|
2
|
+
* Compare two file paths and simplify them to a relative path.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} fromFile - The path of the file the resulting relative path will be used from.
|
|
5
|
+
* @param {string} toFile - The path of the file being referenced.
|
|
6
|
+
* @return {string} `toFile` expressed relative to `fromFile`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const makeRelativePath: (fromFile: string, toFile: string) => string;
|
|
9
|
+
export default makeRelativePath;
|
|
10
|
+
//# sourceMappingURL=makeRelativePath.d.ts.map
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.makeRelativePath = exports.default = void 0
|
|
7
|
-
var _strBefore = _interopRequireDefault(require('./strBefore'))
|
|
8
|
-
var _strAfter = _interopRequireDefault(require('./strAfter'))
|
|
9
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
10
|
-
/**
|
|
11
|
-
* Compare two file paths and simplify them to a relative path.
|
|
12
|
-
* @memberOf module:stringHelpers
|
|
13
|
-
* @param {string} fromFile
|
|
14
|
-
* @param {string} toFile
|
|
15
|
-
* @return {string}
|
|
16
|
-
*/
|
|
17
|
-
const makeRelativePath = (fromFile, toFile) => {
|
|
18
|
-
let relativePath = toFile
|
|
19
|
-
let nextPart = fromFile
|
|
20
|
-
let firstPart = (0, _strBefore.default)(nextPart, '/')
|
|
21
|
-
let hasMatches = false
|
|
22
|
-
while (firstPart && relativePath.startsWith(firstPart)) {
|
|
23
|
-
relativePath = (0, _strAfter.default)(relativePath,
|
|
24
|
-
nextPart = (0, _strAfter.default)(nextPart,
|
|
25
|
-
firstPart = (0, _strBefore.default)(nextPart, '/')
|
|
26
|
-
hasMatches = true
|
|
27
|
-
}
|
|
28
|
-
if (!hasMatches) {
|
|
29
|
-
// No similar base paths, use the path as-is
|
|
30
|
-
return relativePath
|
|
31
|
-
}
|
|
32
|
-
let relativePrefix = ''
|
|
33
|
-
const nextParts = nextPart.split('/')
|
|
34
|
-
if (nextParts.length < 2) {
|
|
35
|
-
relativePrefix = './'
|
|
36
|
-
}
|
|
37
|
-
for (let i = 1; i < nextParts.length; ++i) {
|
|
38
|
-
relativePrefix += '../'
|
|
39
|
-
}
|
|
40
|
-
return relativePrefix + relativePath
|
|
41
|
-
}
|
|
42
|
-
exports.makeRelativePath = makeRelativePath
|
|
43
|
-
var _default = exports.default = makeRelativePath
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.makeRelativePath = exports.default = void 0
|
|
7
|
+
var _strBefore = _interopRequireDefault(require('./strBefore'))
|
|
8
|
+
var _strAfter = _interopRequireDefault(require('./strAfter'))
|
|
9
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
10
|
+
/**
|
|
11
|
+
* Compare two file paths and simplify them to a relative path.
|
|
12
|
+
* @memberOf module:stringHelpers
|
|
13
|
+
* @param {string} fromFile - The path of the file the resulting relative path will be used from.
|
|
14
|
+
* @param {string} toFile - The path of the file being referenced.
|
|
15
|
+
* @return {string} `toFile` expressed relative to `fromFile`.
|
|
16
|
+
*/
|
|
17
|
+
const makeRelativePath = (fromFile, toFile) => {
|
|
18
|
+
let relativePath = toFile
|
|
19
|
+
let nextPart = fromFile
|
|
20
|
+
let firstPart = (0, _strBefore.default)(nextPart, '/')
|
|
21
|
+
let hasMatches = false
|
|
22
|
+
while (firstPart && relativePath.startsWith(firstPart)) {
|
|
23
|
+
relativePath = (0, _strAfter.default)(relativePath, `${firstPart}/`)
|
|
24
|
+
nextPart = (0, _strAfter.default)(nextPart, `${firstPart}/`)
|
|
25
|
+
firstPart = (0, _strBefore.default)(nextPart, '/')
|
|
26
|
+
hasMatches = true
|
|
27
|
+
}
|
|
28
|
+
if (!hasMatches) {
|
|
29
|
+
// No similar base paths, use the path as-is
|
|
30
|
+
return relativePath
|
|
31
|
+
}
|
|
32
|
+
let relativePrefix = ''
|
|
33
|
+
const nextParts = nextPart.split('/')
|
|
34
|
+
if (nextParts.length < 2) {
|
|
35
|
+
relativePrefix = './'
|
|
36
|
+
}
|
|
37
|
+
for (let i = 1; i < nextParts.length; ++i) {
|
|
38
|
+
relativePrefix += '../'
|
|
39
|
+
}
|
|
40
|
+
return relativePrefix + relativePath
|
|
41
|
+
}
|
|
42
|
+
exports.makeRelativePath = makeRelativePath
|
|
43
|
+
var _default = exports.default = makeRelativePath
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeRelativePath=exports.default=void 0;var _strBefore=_interopRequireDefault(require("./strBefore")),_strAfter=_interopRequireDefault(require("./strAfter"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const makeRelativePath=(e,t)=>{let r=t,a=e,l=(0,_strBefore.default)(a,"/"),f=!1;for(;l&&r.startsWith(l);)r=(0,_strAfter.default)(r
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeRelativePath=exports.default=void 0;var _strBefore=_interopRequireDefault(require("./strBefore")),_strAfter=_interopRequireDefault(require("./strAfter"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const makeRelativePath=(e,t)=>{let r=t,a=e,l=(0,_strBefore.default)(a,"/"),f=!1;for(;l&&r.startsWith(l);)r=(0,_strAfter.default)(r,`${l}/`),a=(0,_strAfter.default)(a,`${l}/`),l=(0,_strBefore.default)(a,"/"),f=!0;if(!f)return r;let u="";const s=a.split("/");s.length<2&&(u="./");for(let e=1;e<s.length;++e)u+="../";return u+r};exports.makeRelativePath=makeRelativePath;var _default=exports.default=makeRelativePath;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Take a string and escape the regex characters.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} str
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
|
-
export declare const regexEscape: (str: string) => string;
|
|
8
|
-
export default regexEscape;
|
|
1
|
+
/**
|
|
2
|
+
* Take a string and escape the regex characters.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} str - The string to escape, so it can be used literally inside a `RegExp`.
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export declare const regexEscape: (str: string) => string;
|
|
8
|
+
export default regexEscape;
|
|
9
|
+
//# sourceMappingURL=regexEscape.d.ts.map
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.regexEscape = exports.default = void 0
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* @
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
exports.regexEscape = regexEscape
|
|
17
|
-
var _default = exports.default = regexEscape
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.regexEscape = exports.default = void 0
|
|
7
|
+
/**
|
|
8
|
+
* Take a string and escape the regex characters.
|
|
9
|
+
* @memberOf module:stringHelpers
|
|
10
|
+
* @param {string} str - The string to escape, so it can be used literally inside a `RegExp`.
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
const regexEscape = str => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
14
|
+
exports.regexEscape = regexEscape
|
|
15
|
+
var _default = exports.default = regexEscape
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.regexEscape=exports.default=void 0
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.regexEscape=exports.default=void 0;const regexEscape=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");exports.regexEscape=regexEscape;var _default=exports.default=regexEscape;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import 'core-js/stable';
|
|
2
|
-
/**
|
|
3
|
-
* Given a string in kebab-case, camelCase or 'Sentence case', convert to snake_case.
|
|
4
|
-
* @memberOf module:stringHelpers
|
|
5
|
-
* @param {string} str
|
|
6
|
-
* @returns {string}
|
|
7
|
-
*/
|
|
8
|
-
declare const snakeCase: (str: string) => string;
|
|
9
|
-
export default snakeCase;
|
|
1
|
+
import 'core-js/stable';
|
|
2
|
+
/**
|
|
3
|
+
* Given a string in kebab-case, camelCase or 'Sentence case', convert to snake_case.
|
|
4
|
+
* @memberOf module:stringHelpers
|
|
5
|
+
* @param {string} str - The string to convert.
|
|
6
|
+
* @returns {string}
|
|
7
|
+
*/
|
|
8
|
+
declare const snakeCase: (str: string) => string;
|
|
9
|
+
export default snakeCase;
|
|
10
|
+
//# sourceMappingURL=snakeCase.d.ts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
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.reduce.js')
|
|
9
|
-
require('core-js/stable')
|
|
10
|
-
var _words = _interopRequireDefault(require('./words'))
|
|
11
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
12
|
-
/**
|
|
13
|
-
* Given a string in kebab-case, camelCase or 'Sentence case', convert to snake_case.
|
|
14
|
-
* @memberOf module:stringHelpers
|
|
15
|
-
* @param {string} str
|
|
16
|
-
* @returns {string}
|
|
17
|
-
*/
|
|
18
|
-
const snakeCase = str => (0, _words.default)(str).reduce((snake, part) => snake ? snake.concat('_' + part.toLowerCase()) : part.toLowerCase(), '')
|
|
19
|
-
var _default = exports.default = snakeCase
|
|
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.reduce.js')
|
|
9
|
+
require('core-js/stable')
|
|
10
|
+
var _words = _interopRequireDefault(require('./words'))
|
|
11
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
12
|
+
/**
|
|
13
|
+
* Given a string in kebab-case, camelCase or 'Sentence case', convert to snake_case.
|
|
14
|
+
* @memberOf module:stringHelpers
|
|
15
|
+
* @param {string} str - The string to convert.
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
const snakeCase = str => (0, _words.default)(str).reduce((snake, part) => snake ? snake.concat('_' + part.toLowerCase()) : part.toLowerCase(), '')
|
|
19
|
+
var _default = exports.default = snakeCase
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import 'core-js/stable';
|
|
2
|
-
/**
|
|
3
|
-
* Retrieve the string part after the search match.
|
|
4
|
-
* @memberOf module:stringHelpers
|
|
5
|
-
* @param {string} str
|
|
6
|
-
* @param {string} search
|
|
7
|
-
* @returns {string}
|
|
8
|
-
*/
|
|
9
|
-
declare const strAfter: (str: string, search: string) => string;
|
|
10
|
-
export default strAfter;
|
|
1
|
+
import 'core-js/stable';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve the string part after the search match.
|
|
4
|
+
* @memberOf module:stringHelpers
|
|
5
|
+
* @param {string} str - The string to search within.
|
|
6
|
+
* @param {string} search - The substring to search for.
|
|
7
|
+
* @returns {string} The portion of `str` after the first occurrence of `search`, or `''` if not found.
|
|
8
|
+
*/
|
|
9
|
+
declare const strAfter: (str: string, search: string) => string;
|
|
10
|
+
export default strAfter;
|
|
11
|
+
//# sourceMappingURL=strAfter.d.ts.map
|