si-funciona 2.6.1 → 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 +48 -19
- package/browser/siFunciona.js +80 -77
- package/browser/siFunciona.min.js +1 -1
- 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 +18 -12
- package/dist/helpers/numbers/randomInteger.js +24 -18
- package/dist/helpers/numbers/randomNumber.d.ts +13 -12
- package/dist/helpers/numbers/randomNumber.js +19 -18
- 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 +2 -4
- package/dist/helpers/objects/cloneObject.js +2 -4
- 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 +9 -6
- package/dist/helpers/objects/mergeObjectsBase.js +59 -61
- package/dist/helpers/objects/mergeObjectsBase.min.js +1 -1
- 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 +1 -1
- 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,43 +1,43 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.makeRelativePath = exports.default = void 0
|
|
7
|
-
const _strBefore = _interopRequireDefault(require('./strBefore'))
|
|
8
|
-
const _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
|
-
const _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
|
+
const _strBefore = _interopRequireDefault(require('./strBefore'))
|
|
8
|
+
const _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
|
+
const _default = exports.default = makeRelativePath
|
|
@@ -1,9 +1,9 @@
|
|
|
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;
|
|
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
9
|
//# sourceMappingURL=regexEscape.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
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
|
-
const _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
|
+
const _default = exports.default = regexEscape
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Given a string in kebab-case, camelCase or 'Sentence case', convert to snake_case.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} str - The string to convert.
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
|
-
declare const snakeCase: (str: string) => string;
|
|
8
|
-
export default snakeCase;
|
|
1
|
+
/**
|
|
2
|
+
* Given a string in kebab-case, camelCase or 'Sentence case', convert to snake_case.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} str - The string to convert.
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
declare const snakeCase: (str: string) => string;
|
|
8
|
+
export default snakeCase;
|
|
9
9
|
//# sourceMappingURL=snakeCase.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
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
|
-
const _words = _interopRequireDefault(require('./words'))
|
|
10
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
11
|
-
/**
|
|
12
|
-
* Given a string in kebab-case, camelCase or 'Sentence case', convert to snake_case.
|
|
13
|
-
* @memberOf module:stringHelpers
|
|
14
|
-
* @param {string} str - The string to convert.
|
|
15
|
-
* @returns {string}
|
|
16
|
-
*/
|
|
17
|
-
const snakeCase = str => (0, _words.default)(str).reduce((snake, part) => snake ? snake.concat('_' + part.toLowerCase()) : part.toLowerCase(), '')
|
|
18
|
-
const _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
|
+
const _words = _interopRequireDefault(require('./words'))
|
|
10
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
11
|
+
/**
|
|
12
|
+
* Given a string in kebab-case, camelCase or 'Sentence case', convert to snake_case.
|
|
13
|
+
* @memberOf module:stringHelpers
|
|
14
|
+
* @param {string} str - The string to convert.
|
|
15
|
+
* @returns {string}
|
|
16
|
+
*/
|
|
17
|
+
const snakeCase = str => (0, _words.default)(str).reduce((snake, part) => snake ? snake.concat('_' + part.toLowerCase()) : part.toLowerCase(), '')
|
|
18
|
+
const _default = exports.default = snakeCase
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieve the string part after the search match.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} str - The string to search within.
|
|
5
|
-
* @param {string} search - The substring to search for.
|
|
6
|
-
* @returns {string} The portion of `str` after the first occurrence of `search`, or `''` if not found.
|
|
7
|
-
*/
|
|
8
|
-
declare const strAfter: (str: string, search: string) => string;
|
|
9
|
-
export default strAfter;
|
|
1
|
+
/**
|
|
2
|
+
* Retrieve the string part after the search match.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} str - The string to search within.
|
|
5
|
+
* @param {string} search - The substring to search for.
|
|
6
|
+
* @returns {string} The portion of `str` after the first occurrence of `search`, or `''` if not found.
|
|
7
|
+
*/
|
|
8
|
+
declare const strAfter: (str: string, search: string) => string;
|
|
9
|
+
export default strAfter;
|
|
10
10
|
//# sourceMappingURL=strAfter.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
/**
|
|
8
|
-
* Retrieve the string part after the search match.
|
|
9
|
-
* @memberOf module:stringHelpers
|
|
10
|
-
* @param {string} str - The string to search within.
|
|
11
|
-
* @param {string} search - The substring to search for.
|
|
12
|
-
* @returns {string} The portion of `str` after the first occurrence of `search`, or `''` if not found.
|
|
13
|
-
*/
|
|
14
|
-
const strAfter = (str, search) => {
|
|
15
|
-
const index = str.indexOf(search)
|
|
16
|
-
return index === -1 ? '' : str.substring(index + search.length)
|
|
17
|
-
}
|
|
18
|
-
const _default = exports.default = strAfter
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve the string part after the search match.
|
|
9
|
+
* @memberOf module:stringHelpers
|
|
10
|
+
* @param {string} str - The string to search within.
|
|
11
|
+
* @param {string} search - The substring to search for.
|
|
12
|
+
* @returns {string} The portion of `str` after the first occurrence of `search`, or `''` if not found.
|
|
13
|
+
*/
|
|
14
|
+
const strAfter = (str, search) => {
|
|
15
|
+
const index = str.indexOf(search)
|
|
16
|
+
return index === -1 ? '' : str.substring(index + search.length)
|
|
17
|
+
}
|
|
18
|
+
const _default = exports.default = strAfter
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieve the string part after the last search match.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} str - The string to search within.
|
|
5
|
-
* @param {string} search - The substring to search for.
|
|
6
|
-
* @returns {string} The portion of `str` after the last occurrence of `search`, or `''` if not found.
|
|
7
|
-
*/
|
|
8
|
-
declare const strAfterLast: (str: string, search: string) => string;
|
|
9
|
-
export default strAfterLast;
|
|
1
|
+
/**
|
|
2
|
+
* Retrieve the string part after the last search match.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} str - The string to search within.
|
|
5
|
+
* @param {string} search - The substring to search for.
|
|
6
|
+
* @returns {string} The portion of `str` after the last occurrence of `search`, or `''` if not found.
|
|
7
|
+
*/
|
|
8
|
+
declare const strAfterLast: (str: string, search: string) => string;
|
|
9
|
+
export default strAfterLast;
|
|
10
10
|
//# sourceMappingURL=strAfterLast.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
/**
|
|
8
|
-
* Retrieve the string part after the last search match.
|
|
9
|
-
* @memberOf module:stringHelpers
|
|
10
|
-
* @param {string} str - The string to search within.
|
|
11
|
-
* @param {string} search - The substring to search for.
|
|
12
|
-
* @returns {string} The portion of `str` after the last occurrence of `search`, or `''` if not found.
|
|
13
|
-
*/
|
|
14
|
-
const strAfterLast = (str, search) => {
|
|
15
|
-
const index = str.lastIndexOf(search)
|
|
16
|
-
return index === -1 ? '' : str.substring(index + search.length)
|
|
17
|
-
}
|
|
18
|
-
const _default = exports.default = strAfterLast
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve the string part after the last search match.
|
|
9
|
+
* @memberOf module:stringHelpers
|
|
10
|
+
* @param {string} str - The string to search within.
|
|
11
|
+
* @param {string} search - The substring to search for.
|
|
12
|
+
* @returns {string} The portion of `str` after the last occurrence of `search`, or `''` if not found.
|
|
13
|
+
*/
|
|
14
|
+
const strAfterLast = (str, search) => {
|
|
15
|
+
const index = str.lastIndexOf(search)
|
|
16
|
+
return index === -1 ? '' : str.substring(index + search.length)
|
|
17
|
+
}
|
|
18
|
+
const _default = exports.default = strAfterLast
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieve the string part before the search match.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} str - The string to search within.
|
|
5
|
-
* @param {string} search - The substring to search for.
|
|
6
|
-
* @returns {string} The portion of `str` before the first occurrence of `search`, or `''` if not found.
|
|
7
|
-
*/
|
|
8
|
-
declare const strBefore: (str: string, search: string) => string;
|
|
9
|
-
export default strBefore;
|
|
1
|
+
/**
|
|
2
|
+
* Retrieve the string part before the search match.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} str - The string to search within.
|
|
5
|
+
* @param {string} search - The substring to search for.
|
|
6
|
+
* @returns {string} The portion of `str` before the first occurrence of `search`, or `''` if not found.
|
|
7
|
+
*/
|
|
8
|
+
declare const strBefore: (str: string, search: string) => string;
|
|
9
|
+
export default strBefore;
|
|
10
10
|
//# sourceMappingURL=strBefore.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
/**
|
|
8
|
-
* Retrieve the string part before the search match.
|
|
9
|
-
* @memberOf module:stringHelpers
|
|
10
|
-
* @param {string} str - The string to search within.
|
|
11
|
-
* @param {string} search - The substring to search for.
|
|
12
|
-
* @returns {string} The portion of `str` before the first occurrence of `search`, or `''` if not found.
|
|
13
|
-
*/
|
|
14
|
-
const strBefore = (str, search) => {
|
|
15
|
-
const index = str.indexOf(search)
|
|
16
|
-
return index === -1 ? '' : str.slice(0, index)
|
|
17
|
-
}
|
|
18
|
-
const _default = exports.default = strBefore
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve the string part before the search match.
|
|
9
|
+
* @memberOf module:stringHelpers
|
|
10
|
+
* @param {string} str - The string to search within.
|
|
11
|
+
* @param {string} search - The substring to search for.
|
|
12
|
+
* @returns {string} The portion of `str` before the first occurrence of `search`, or `''` if not found.
|
|
13
|
+
*/
|
|
14
|
+
const strBefore = (str, search) => {
|
|
15
|
+
const index = str.indexOf(search)
|
|
16
|
+
return index === -1 ? '' : str.slice(0, index)
|
|
17
|
+
}
|
|
18
|
+
const _default = exports.default = strBefore
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieve the string part before the last search match.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} str - The string to search within.
|
|
5
|
-
* @param {string} search - The substring to search for.
|
|
6
|
-
* @returns {string} The portion of `str` before the last occurrence of `search`, or `''` if not found.
|
|
7
|
-
*/
|
|
8
|
-
declare const strBeforeLast: (str: string, search: string) => string;
|
|
9
|
-
export default strBeforeLast;
|
|
1
|
+
/**
|
|
2
|
+
* Retrieve the string part before the last search match.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} str - The string to search within.
|
|
5
|
+
* @param {string} search - The substring to search for.
|
|
6
|
+
* @returns {string} The portion of `str` before the last occurrence of `search`, or `''` if not found.
|
|
7
|
+
*/
|
|
8
|
+
declare const strBeforeLast: (str: string, search: string) => string;
|
|
9
|
+
export default strBeforeLast;
|
|
10
10
|
//# sourceMappingURL=strBeforeLast.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
/**
|
|
8
|
-
* Retrieve the string part before the last search match.
|
|
9
|
-
* @memberOf module:stringHelpers
|
|
10
|
-
* @param {string} str - The string to search within.
|
|
11
|
-
* @param {string} search - The substring to search for.
|
|
12
|
-
* @returns {string} The portion of `str` before the last occurrence of `search`, or `''` if not found.
|
|
13
|
-
*/
|
|
14
|
-
const strBeforeLast = (str, search) => {
|
|
15
|
-
const index = str.lastIndexOf(search)
|
|
16
|
-
return index === -1 ? '' : str.substring(0, index)
|
|
17
|
-
}
|
|
18
|
-
const _default = exports.default = strBeforeLast
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve the string part before the last search match.
|
|
9
|
+
* @memberOf module:stringHelpers
|
|
10
|
+
* @param {string} str - The string to search within.
|
|
11
|
+
* @param {string} search - The substring to search for.
|
|
12
|
+
* @returns {string} The portion of `str` before the last occurrence of `search`, or `''` if not found.
|
|
13
|
+
*/
|
|
14
|
+
const strBeforeLast = (str, search) => {
|
|
15
|
+
const index = str.lastIndexOf(search)
|
|
16
|
+
return index === -1 ? '' : str.substring(0, index)
|
|
17
|
+
}
|
|
18
|
+
const _default = exports.default = strBeforeLast
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Given a string in kebab-case, snake_case, camelCase or 'Sentence case', convert to 'Title Case'.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} str - The string to convert.
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
|
-
declare const titleCase: (str: string) => string;
|
|
8
|
-
export default titleCase;
|
|
1
|
+
/**
|
|
2
|
+
* Given a string in kebab-case, snake_case, camelCase or 'Sentence case', convert to 'Title Case'.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} str - The string to convert.
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
declare const titleCase: (str: string) => string;
|
|
8
|
+
export default titleCase;
|
|
9
9
|
//# sourceMappingURL=titleCase.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
|
-
const _ucFirst = _interopRequireDefault(require('./ucFirst'))
|
|
10
|
-
const _words = _interopRequireDefault(require('./words'))
|
|
11
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
12
|
-
/**
|
|
13
|
-
* Given a string in kebab-case, snake_case, camelCase or 'Sentence case', convert to 'Title Case'.
|
|
14
|
-
* @memberOf module:stringHelpers
|
|
15
|
-
* @param {string} str - The string to convert.
|
|
16
|
-
* @returns {string}
|
|
17
|
-
*/
|
|
18
|
-
const titleCase = str => (0, _words.default)(str).reduce((title, part) => title ? title.concat(' ' + (0, _ucFirst.default)(part)) : (0, _ucFirst.default)(part), '')
|
|
19
|
-
const _default = exports.default = titleCase
|
|
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
|
+
const _ucFirst = _interopRequireDefault(require('./ucFirst'))
|
|
10
|
+
const _words = _interopRequireDefault(require('./words'))
|
|
11
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
12
|
+
/**
|
|
13
|
+
* Given a string in kebab-case, snake_case, camelCase or 'Sentence case', convert to 'Title Case'.
|
|
14
|
+
* @memberOf module:stringHelpers
|
|
15
|
+
* @param {string} str - The string to convert.
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
const titleCase = str => (0, _words.default)(str).reduce((title, part) => title ? title.concat(' ' + (0, _ucFirst.default)(part)) : (0, _ucFirst.default)(part), '')
|
|
19
|
+
const _default = exports.default = titleCase
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Given a string, make the first character uppercase and the rest lowercase.
|
|
3
|
-
* @memberOf module:stringHelpers
|
|
4
|
-
* @param {string} str - The string to convert.
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
|
-
declare const ucFirst: (str: string) => string;
|
|
8
|
-
export default ucFirst;
|
|
1
|
+
/**
|
|
2
|
+
* Given a string, make the first character uppercase and the rest lowercase.
|
|
3
|
+
* @memberOf module:stringHelpers
|
|
4
|
+
* @param {string} str - The string to convert.
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
declare const ucFirst: (str: string) => string;
|
|
8
|
+
export default ucFirst;
|
|
9
9
|
//# sourceMappingURL=ucFirst.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
/**
|
|
8
|
-
* Given a string, make the first character uppercase and the rest lowercase.
|
|
9
|
-
* @memberOf module:stringHelpers
|
|
10
|
-
* @param {string} str - The string to convert.
|
|
11
|
-
* @returns {string}
|
|
12
|
-
*/
|
|
13
|
-
const ucFirst = str => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
|
|
14
|
-
const _default = exports.default = ucFirst
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
/**
|
|
8
|
+
* Given a string, make the first character uppercase and the rest lowercase.
|
|
9
|
+
* @memberOf module:stringHelpers
|
|
10
|
+
* @param {string} str - The string to convert.
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
const ucFirst = str => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
|
|
14
|
+
const _default = exports.default = ucFirst
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Split a string into sets of numbers or letters - the shared tokenizer behind camelCase/kabobCase/snakeCase/
|
|
3
|
-
* titleCase, so each can rebuild the string in its own casing style.
|
|
4
|
-
* @memberOf module:stringHelpers
|
|
5
|
-
* @param {string} str - The string to split.
|
|
6
|
-
* @returns {Array.<string>}
|
|
7
|
-
*/
|
|
8
|
-
declare const words: (str: string) => Array<string>;
|
|
9
|
-
export default words;
|
|
1
|
+
/**
|
|
2
|
+
* Split a string into sets of numbers or letters - the shared tokenizer behind camelCase/kabobCase/snakeCase/
|
|
3
|
+
* titleCase, so each can rebuild the string in its own casing style.
|
|
4
|
+
* @memberOf module:stringHelpers
|
|
5
|
+
* @param {string} str - The string to split.
|
|
6
|
+
* @returns {Array.<string>}
|
|
7
|
+
*/
|
|
8
|
+
declare const words: (str: string) => Array<string>;
|
|
9
|
+
export default words;
|
|
10
10
|
//# sourceMappingURL=words.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.default = void 0
|
|
7
|
-
/**
|
|
8
|
-
* Split a string into sets of numbers or letters - the shared tokenizer behind camelCase/kabobCase/snakeCase/
|
|
9
|
-
* titleCase, so each can rebuild the string in its own casing style.
|
|
10
|
-
* @memberOf module:stringHelpers
|
|
11
|
-
* @param {string} str - The string to split.
|
|
12
|
-
* @returns {Array.<string>}
|
|
13
|
-
*/
|
|
14
|
-
const words = str => str.match(/\d+|[A-Z]?[a-z]+|[A-Za-z]+/g)
|
|
15
|
-
const _default = exports.default = words
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.default = void 0
|
|
7
|
+
/**
|
|
8
|
+
* Split a string into sets of numbers or letters - the shared tokenizer behind camelCase/kabobCase/snakeCase/
|
|
9
|
+
* titleCase, so each can rebuild the string in its own casing style.
|
|
10
|
+
* @memberOf module:stringHelpers
|
|
11
|
+
* @param {string} str - The string to split.
|
|
12
|
+
* @returns {Array.<string>}
|
|
13
|
+
*/
|
|
14
|
+
const words = str => str.match(/\d+|[A-Z]?[a-z]+|[A-Za-z]+/g)
|
|
15
|
+
const _default = exports.default = words
|