es-toolkit 1.17.0 → 1.18.0-dev.571
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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/_chunk/{index-CoqN5B.js → index-BGZDR9.js} +4 -1
- package/dist/_chunk/{isTypedArray-BBEkFl.js → isTypedArray-Dsrnb1.js} +1 -11
- package/dist/_chunk/{isFunction-aCEz9d.js → isWeakSet-CogETi.js} +11 -1
- package/dist/_chunk/rest-CXt9w3.js +182 -0
- package/dist/_chunk/{toMerged-BGwYW5.js → toMerged-DN1PPP.js} +1 -1
- package/dist/_chunk/{initial-Ci2bn_.js → zipWith-CYaH1Y.js} +46 -70
- package/dist/array/countBy.d.mts +10 -0
- package/dist/array/countBy.d.ts +10 -0
- package/dist/array/fill.d.mts +55 -2
- package/dist/array/fill.d.ts +55 -2
- package/dist/array/flatMapDeep.d.mts +18 -0
- package/dist/array/flatMapDeep.d.ts +18 -0
- package/dist/array/flatMapDeep.mjs +7 -0
- package/dist/array/flattenDeep.d.mts +1 -1
- package/dist/array/flattenDeep.d.ts +1 -1
- package/dist/array/head.d.mts +14 -3
- package/dist/array/head.d.ts +14 -3
- package/dist/array/index.d.mts +9 -8
- package/dist/array/index.d.ts +9 -8
- package/dist/array/index.js +87 -58
- package/dist/array/index.mjs +9 -8
- package/dist/array/last.d.mts +23 -1
- package/dist/array/last.d.ts +23 -1
- package/dist/array/maxBy.d.mts +13 -1
- package/dist/array/maxBy.d.ts +13 -1
- package/dist/array/minBy.d.mts +13 -1
- package/dist/array/minBy.d.ts +13 -1
- package/dist/array/toFilled.d.mts +59 -2
- package/dist/array/toFilled.d.ts +59 -2
- package/dist/array/zip.d.mts +65 -7
- package/dist/array/zip.d.ts +65 -7
- package/dist/array/zipObject.d.mts +2 -4
- package/dist/array/zipObject.d.ts +2 -4
- package/dist/array/zipWith.d.mts +39 -6
- package/dist/array/zipWith.d.ts +39 -6
- package/dist/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/compat/_internal/compareValues.mjs +30 -5
- package/dist/compat/_internal/normalizeForCase.mjs +9 -0
- package/dist/compat/array/castArray.d.mts +29 -0
- package/dist/compat/array/castArray.d.ts +29 -0
- package/dist/compat/array/castArray.mjs +8 -0
- package/dist/compat/array/difference.d.mts +19 -0
- package/dist/compat/array/difference.d.ts +19 -0
- package/dist/compat/array/fill.d.mts +55 -2
- package/dist/compat/array/fill.d.ts +55 -2
- package/dist/compat/array/findLastIndex.d.mts +66 -0
- package/dist/compat/array/findLastIndex.d.ts +66 -0
- package/dist/compat/array/findLastIndex.mjs +33 -0
- package/dist/compat/array/join.d.mts +16 -0
- package/dist/compat/array/join.d.ts +16 -0
- package/dist/compat/array/join.mjs +5 -0
- package/dist/compat/array/orderBy.d.mts +6 -6
- package/dist/compat/array/orderBy.d.ts +6 -6
- package/dist/compat/array/orderBy.mjs +26 -18
- package/dist/compat/array/some.d.mts +86 -0
- package/dist/compat/array/some.d.ts +86 -0
- package/dist/compat/array/some.mjs +36 -0
- package/dist/compat/array/sortBy.d.mts +34 -0
- package/dist/compat/array/sortBy.d.ts +34 -0
- package/dist/compat/array/sortBy.mjs +7 -0
- package/dist/compat/function/ary.d.mts +11 -1
- package/dist/compat/function/ary.d.ts +11 -1
- package/dist/compat/function/attempt.d.mts +33 -0
- package/dist/compat/function/attempt.d.ts +33 -0
- package/dist/compat/function/attempt.mjs +10 -0
- package/dist/compat/function/bindKey.d.mts +45 -0
- package/dist/compat/function/bindKey.d.ts +45 -0
- package/dist/compat/function/bindKey.mjs +27 -0
- package/dist/compat/function/rearg.d.mts +18 -0
- package/dist/compat/function/rearg.d.ts +18 -0
- package/dist/compat/function/rearg.mjs +14 -0
- package/dist/compat/function/spread.d.mts +47 -0
- package/dist/compat/function/spread.d.ts +47 -0
- package/dist/compat/function/spread.mjs +16 -0
- package/dist/compat/index.d.mts +31 -10
- package/dist/compat/index.d.ts +31 -10
- package/dist/compat/index.js +401 -143
- package/dist/compat/index.mjs +32 -11
- package/dist/compat/math/max.d.mts +16 -5
- package/dist/compat/math/max.d.ts +16 -5
- package/dist/compat/math/min.d.mts +16 -4
- package/dist/compat/math/min.d.ts +16 -4
- package/dist/compat/math/parseInt.d.mts +20 -0
- package/dist/compat/math/parseInt.d.ts +20 -0
- package/dist/compat/math/parseInt.mjs +8 -0
- package/dist/compat/object/fromPairs.d.mts +29 -0
- package/dist/compat/object/fromPairs.d.ts +29 -0
- package/dist/compat/object/fromPairs.mjs +14 -0
- package/dist/compat/predicate/conforms.d.mts +22 -0
- package/dist/compat/predicate/conforms.d.ts +22 -0
- package/dist/compat/predicate/conforms.mjs +11 -0
- package/dist/compat/predicate/conformsTo.d.mts +29 -0
- package/dist/compat/predicate/conformsTo.d.ts +29 -0
- package/dist/compat/predicate/conformsTo.mjs +18 -0
- package/dist/compat/predicate/isObject.d.mts +26 -0
- package/dist/compat/predicate/isObject.d.ts +26 -0
- package/dist/compat/predicate/isObject.mjs +5 -0
- package/dist/compat/predicate/isRegExp.d.mts +7 -0
- package/dist/compat/predicate/isRegExp.d.ts +7 -0
- package/dist/compat/predicate/isTypedArray.d.mts +10 -0
- package/dist/compat/predicate/isTypedArray.d.ts +10 -0
- package/dist/compat/predicate/isWeakMap.d.mts +23 -0
- package/dist/compat/predicate/isWeakMap.d.ts +23 -0
- package/dist/compat/predicate/isWeakMap.mjs +7 -0
- package/dist/compat/predicate/isWeakSet.d.mts +23 -0
- package/dist/compat/predicate/isWeakSet.d.ts +23 -0
- package/dist/compat/predicate/isWeakSet.mjs +7 -0
- package/dist/compat/string/camelCase.d.mts +18 -0
- package/dist/compat/string/camelCase.d.ts +18 -0
- package/dist/compat/string/camelCase.mjs +8 -0
- package/dist/compat/string/endsWith.d.mts +1 -1
- package/dist/compat/string/endsWith.d.ts +1 -1
- package/dist/compat/string/endsWith.mjs +2 -2
- package/dist/compat/string/repeat.d.mts +17 -0
- package/dist/compat/string/repeat.d.ts +17 -0
- package/dist/compat/string/repeat.mjs +5 -0
- package/dist/compat/string/startsWith.d.mts +1 -1
- package/dist/compat/string/startsWith.d.ts +1 -1
- package/dist/compat/string/startsWith.mjs +2 -2
- package/dist/function/after.d.mts +1 -1
- package/dist/function/after.d.ts +1 -1
- package/dist/function/after.mjs +2 -2
- package/dist/function/before.d.mts +1 -1
- package/dist/function/before.d.ts +1 -1
- package/dist/function/before.mjs +2 -2
- package/dist/function/debounce.d.mts +3 -3
- package/dist/function/debounce.d.ts +3 -3
- package/dist/function/index.d.mts +1 -0
- package/dist/function/index.d.ts +1 -0
- package/dist/function/index.js +22 -180
- package/dist/function/index.mjs +1 -0
- package/dist/function/memoize.d.mts +37 -1
- package/dist/function/memoize.d.ts +37 -1
- package/dist/function/negate.d.mts +7 -1
- package/dist/function/negate.d.ts +7 -1
- package/dist/function/spread.d.mts +19 -0
- package/dist/function/spread.d.ts +19 -0
- package/dist/function/spread.mjs +7 -0
- package/dist/function/unary.d.mts +7 -0
- package/dist/function/unary.d.ts +7 -0
- package/dist/index.d.mts +16 -8
- package/dist/index.d.ts +16 -8
- package/dist/index.js +89 -80
- package/dist/index.mjs +16 -8
- package/dist/math/clamp.d.mts +14 -3
- package/dist/math/clamp.d.ts +14 -3
- package/dist/math/random.d.mts +13 -2
- package/dist/math/random.d.ts +13 -2
- package/dist/math/randomInt.d.mts +11 -3
- package/dist/math/randomInt.d.ts +11 -3
- package/dist/math/range.d.mts +25 -0
- package/dist/math/range.d.ts +25 -0
- package/dist/object/index.js +1 -1
- package/dist/object/invert.d.mts +2 -4
- package/dist/object/invert.d.ts +2 -4
- package/dist/predicate/index.d.mts +2 -0
- package/dist/predicate/index.d.ts +2 -0
- package/dist/predicate/index.js +11 -9
- package/dist/predicate/index.mjs +2 -0
- package/dist/predicate/isPrimitive.d.mts +14 -0
- package/dist/predicate/isPrimitive.d.ts +14 -0
- package/dist/predicate/isRegExp.d.mts +8 -1
- package/dist/predicate/isRegExp.d.ts +8 -1
- package/dist/predicate/isSymbol.d.mts +15 -0
- package/dist/predicate/isSymbol.d.ts +15 -0
- package/dist/predicate/isTypedArray.d.mts +10 -0
- package/dist/predicate/isTypedArray.d.ts +10 -0
- package/dist/predicate/isTypedArray.mjs +1 -11
- package/dist/predicate/isWeakMap.d.mts +23 -0
- package/dist/predicate/isWeakMap.d.ts +23 -0
- package/dist/predicate/isWeakMap.mjs +5 -0
- package/dist/predicate/isWeakSet.d.mts +23 -0
- package/dist/predicate/isWeakSet.d.ts +23 -0
- package/dist/predicate/isWeakSet.mjs +5 -0
- package/dist/promise/delay.mjs +4 -1
- package/dist/promise/index.js +1 -1
- package/dist/promise/timeout.d.mts +7 -0
- package/dist/promise/timeout.d.ts +7 -0
- package/dist/string/capitalize.d.mts +1 -1
- package/dist/string/capitalize.d.ts +1 -1
- package/dist/string/capitalize.mjs +2 -2
- package/dist/string/deburr.mjs +5 -5
- package/dist/string/escape.d.mts +16 -0
- package/dist/string/escape.d.ts +16 -0
- package/dist/string/escape.mjs +12 -0
- package/dist/string/escapeRegExp.d.mts +14 -0
- package/dist/string/escapeRegExp.d.ts +14 -0
- package/dist/string/escapeRegExp.mjs +5 -0
- package/dist/string/index.d.mts +4 -0
- package/dist/string/index.d.ts +4 -0
- package/dist/string/index.js +53 -19
- package/dist/string/index.mjs +4 -0
- package/dist/string/kebabCase.d.mts +1 -1
- package/dist/string/kebabCase.d.ts +1 -1
- package/dist/string/kebabCase.mjs +2 -2
- package/dist/string/lowerCase.d.mts +1 -1
- package/dist/string/lowerCase.d.ts +1 -1
- package/dist/string/lowerCase.mjs +2 -2
- package/dist/string/lowerFirst.d.mts +1 -1
- package/dist/string/lowerFirst.d.ts +1 -1
- package/dist/string/lowerFirst.mjs +2 -2
- package/dist/string/pad.d.mts +19 -0
- package/dist/string/pad.d.ts +19 -0
- package/dist/string/pad.mjs +5 -0
- package/dist/string/pascalCase.d.mts +1 -1
- package/dist/string/pascalCase.d.ts +1 -1
- package/dist/string/pascalCase.mjs +2 -2
- package/dist/string/snakeCase.d.mts +1 -1
- package/dist/string/snakeCase.d.ts +1 -1
- package/dist/string/snakeCase.mjs +2 -2
- package/dist/string/unescape.d.mts +16 -0
- package/dist/string/unescape.d.ts +16 -0
- package/dist/string/unescape.mjs +12 -0
- package/dist/string/upperFirst.d.mts +1 -1
- package/dist/string/upperFirst.d.ts +1 -1
- package/dist/string/upperFirst.mjs +2 -2
- package/package.json +7 -2
package/dist/compat/index.js
CHANGED
|
@@ -2,32 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const promise_index = require('../_chunk/index-
|
|
7
|
-
const
|
|
5
|
+
const zipWith = require('../_chunk/zipWith-CYaH1Y.js');
|
|
6
|
+
const promise_index = require('../_chunk/index-BGZDR9.js');
|
|
7
|
+
const rest$1 = require('../_chunk/rest-CXt9w3.js');
|
|
8
8
|
const math_index = require('../math/index.js');
|
|
9
9
|
const randomInt = require('../_chunk/randomInt-CF7bZK.js');
|
|
10
|
-
const toMerged = require('../_chunk/toMerged-
|
|
11
|
-
const
|
|
12
|
-
const isTypedArray$1 = require('../_chunk/isTypedArray-
|
|
10
|
+
const toMerged = require('../_chunk/toMerged-DN1PPP.js');
|
|
11
|
+
const isWeakSet$1 = require('../_chunk/isWeakSet-CogETi.js');
|
|
12
|
+
const isTypedArray$1 = require('../_chunk/isTypedArray-Dsrnb1.js');
|
|
13
13
|
const string_index = require('../string/index.js');
|
|
14
14
|
|
|
15
|
+
function castArray(value) {
|
|
16
|
+
if (arguments.length === 0) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
return Array.isArray(value) ? value : [value];
|
|
20
|
+
}
|
|
21
|
+
|
|
15
22
|
function chunk(arr, size = 1) {
|
|
16
23
|
size = Math.max(Math.floor(size), 0);
|
|
17
24
|
if (size === 0) {
|
|
18
25
|
return [];
|
|
19
26
|
}
|
|
20
|
-
return
|
|
27
|
+
return zipWith.chunk(arr, size);
|
|
21
28
|
}
|
|
22
29
|
|
|
23
30
|
function concat(...values) {
|
|
24
|
-
return
|
|
31
|
+
return zipWith.flatten(values);
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
function difference(arr, ...values) {
|
|
28
35
|
const arr1 = arr;
|
|
29
|
-
const arr2 =
|
|
30
|
-
return
|
|
36
|
+
const arr2 = zipWith.flatten(values);
|
|
37
|
+
return zipWith.difference(arr1, arr2);
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
function fill(array, value, start = 0, end = array.length) {
|
|
@@ -39,7 +46,7 @@ function fill(array, value, start = 0, end = array.length) {
|
|
|
39
46
|
if (!end) {
|
|
40
47
|
end = 0;
|
|
41
48
|
}
|
|
42
|
-
return
|
|
49
|
+
return zipWith.fill(array, value, start, end);
|
|
43
50
|
}
|
|
44
51
|
|
|
45
52
|
const IS_PLAIN = /^\w*$/;
|
|
@@ -250,14 +257,14 @@ function cloneDeep(obj) {
|
|
|
250
257
|
return toMerged.cloneDeep(obj);
|
|
251
258
|
}
|
|
252
259
|
switch (Object.prototype.toString.call(obj)) {
|
|
253
|
-
case
|
|
254
|
-
case
|
|
255
|
-
case
|
|
260
|
+
case isWeakSet$1.numberTag:
|
|
261
|
+
case isWeakSet$1.stringTag:
|
|
262
|
+
case isWeakSet$1.booleanTag: {
|
|
256
263
|
const result = new obj.constructor(obj?.valueOf());
|
|
257
264
|
toMerged.copyProperties(result, obj);
|
|
258
265
|
return result;
|
|
259
266
|
}
|
|
260
|
-
case
|
|
267
|
+
case isWeakSet$1.argumentsTag: {
|
|
261
268
|
const result = {};
|
|
262
269
|
toMerged.copyProperties(result, obj);
|
|
263
270
|
result.length = obj.length;
|
|
@@ -286,7 +293,7 @@ function isIndex(value) {
|
|
|
286
293
|
}
|
|
287
294
|
|
|
288
295
|
function isArguments(value) {
|
|
289
|
-
return value !== null && typeof value === 'object' &&
|
|
296
|
+
return value !== null && typeof value === 'object' && isWeakSet$1.getTag(value) === '[object Arguments]';
|
|
290
297
|
}
|
|
291
298
|
|
|
292
299
|
function has(object, path) {
|
|
@@ -390,6 +397,34 @@ function findIndex(source, doesMatch) {
|
|
|
390
397
|
}
|
|
391
398
|
}
|
|
392
399
|
|
|
400
|
+
function findLastIndex(source, doesMatch, fromIndex = source.length - 1) {
|
|
401
|
+
if (fromIndex < 0) {
|
|
402
|
+
fromIndex = Math.max(source.length + fromIndex, 0);
|
|
403
|
+
}
|
|
404
|
+
else {
|
|
405
|
+
fromIndex = Math.min(fromIndex, source.length - 1);
|
|
406
|
+
}
|
|
407
|
+
source = source.slice(0, fromIndex + 1);
|
|
408
|
+
switch (typeof doesMatch) {
|
|
409
|
+
case 'function': {
|
|
410
|
+
return source.findLastIndex(doesMatch);
|
|
411
|
+
}
|
|
412
|
+
case 'object': {
|
|
413
|
+
if (Array.isArray(doesMatch) && doesMatch.length === 2) {
|
|
414
|
+
const key = doesMatch[0];
|
|
415
|
+
const value = doesMatch[1];
|
|
416
|
+
return source.findLastIndex(matchesProperty(key, value));
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
return source.findLastIndex(matches(doesMatch));
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
case 'string': {
|
|
423
|
+
return source.findLastIndex(property(doesMatch));
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
393
428
|
function flatten(value, depth = 1) {
|
|
394
429
|
const result = [];
|
|
395
430
|
const flooredDepth = Math.floor(depth);
|
|
@@ -426,12 +461,60 @@ function flattenDepth(value, depth = 1) {
|
|
|
426
461
|
return flatten(value, depth);
|
|
427
462
|
}
|
|
428
463
|
|
|
429
|
-
|
|
430
|
-
if (
|
|
431
|
-
return
|
|
464
|
+
function indexOf(array, searchElement, fromIndex) {
|
|
465
|
+
if (array == null) {
|
|
466
|
+
return -1;
|
|
467
|
+
}
|
|
468
|
+
if (Number.isNaN(searchElement)) {
|
|
469
|
+
fromIndex = fromIndex ?? 0;
|
|
470
|
+
if (fromIndex < 0) {
|
|
471
|
+
fromIndex = Math.max(0, array.length + fromIndex);
|
|
472
|
+
}
|
|
473
|
+
for (let i = fromIndex; i < array.length; i++) {
|
|
474
|
+
if (Number.isNaN(array[i])) {
|
|
475
|
+
return i;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
return -1;
|
|
479
|
+
}
|
|
480
|
+
return array.indexOf(searchElement, fromIndex);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
function join(array, separator = ',') {
|
|
484
|
+
return array.join(separator);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
function getPriority(a) {
|
|
488
|
+
if (typeof a === 'symbol') {
|
|
489
|
+
return 1;
|
|
490
|
+
}
|
|
491
|
+
if (a === null) {
|
|
492
|
+
return 2;
|
|
493
|
+
}
|
|
494
|
+
if (a === undefined) {
|
|
495
|
+
return 3;
|
|
432
496
|
}
|
|
433
|
-
if (
|
|
434
|
-
return
|
|
497
|
+
if (a !== a) {
|
|
498
|
+
return 4;
|
|
499
|
+
}
|
|
500
|
+
return 0;
|
|
501
|
+
}
|
|
502
|
+
const compareValues = (a, b, order) => {
|
|
503
|
+
if (a !== b) {
|
|
504
|
+
if (typeof a === 'string' && typeof b === 'string') {
|
|
505
|
+
return order === 'desc' ? b.localeCompare(a) : a.localeCompare(b);
|
|
506
|
+
}
|
|
507
|
+
const aPriority = getPriority(a);
|
|
508
|
+
const bPriority = getPriority(b);
|
|
509
|
+
if (aPriority === bPriority && aPriority === 0) {
|
|
510
|
+
if (a < b) {
|
|
511
|
+
return order === 'desc' ? 1 : -1;
|
|
512
|
+
}
|
|
513
|
+
if (a > b) {
|
|
514
|
+
return order === 'desc' ? -1 : 1;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
return order === 'desc' ? bPriority - aPriority : aPriority - bPriority;
|
|
435
518
|
}
|
|
436
519
|
return 0;
|
|
437
520
|
};
|
|
@@ -450,68 +533,80 @@ function isKey(value, object) {
|
|
|
450
533
|
}
|
|
451
534
|
|
|
452
535
|
function orderBy(collection, criteria, orders) {
|
|
453
|
-
if (collection == null) {
|
|
536
|
+
if (collection == null || typeof collection === 'number') {
|
|
454
537
|
return [];
|
|
455
538
|
}
|
|
456
|
-
if (
|
|
539
|
+
if (typeof collection === 'object' && !Array.isArray(collection)) {
|
|
457
540
|
collection = Object.values(collection);
|
|
458
541
|
}
|
|
459
542
|
if (!Array.isArray(criteria)) {
|
|
460
|
-
criteria = criteria == null ? [] : [criteria];
|
|
543
|
+
criteria = criteria == null ? [null] : [criteria];
|
|
461
544
|
}
|
|
462
545
|
if (!Array.isArray(orders)) {
|
|
463
546
|
orders = orders == null ? [] : [orders];
|
|
464
547
|
}
|
|
548
|
+
orders = orders.map(order => String(order));
|
|
465
549
|
const getValueByNestedPath = (object, path) => {
|
|
466
550
|
let target = object;
|
|
467
|
-
for (let i = 0; i < path.length && target != null; i
|
|
551
|
+
for (let i = 0; i < path.length && target != null; ++i) {
|
|
468
552
|
target = target[path[i]];
|
|
469
553
|
}
|
|
470
554
|
return target;
|
|
471
555
|
};
|
|
472
556
|
const getValueByCriterion = (criterion, object) => {
|
|
473
|
-
if (object == null) {
|
|
557
|
+
if (object == null || criterion == null) {
|
|
474
558
|
return object;
|
|
475
559
|
}
|
|
560
|
+
if (typeof criterion === 'object' && 'key' in criterion) {
|
|
561
|
+
if (Object.hasOwn(object, criterion.key)) {
|
|
562
|
+
return object[criterion.key];
|
|
563
|
+
}
|
|
564
|
+
return getValueByNestedPath(object, criterion.path);
|
|
565
|
+
}
|
|
476
566
|
if (typeof criterion === 'function') {
|
|
477
567
|
return criterion(object);
|
|
478
568
|
}
|
|
479
569
|
if (Array.isArray(criterion)) {
|
|
480
570
|
return getValueByNestedPath(object, criterion);
|
|
481
571
|
}
|
|
482
|
-
if (typeof
|
|
572
|
+
if (typeof object === 'object') {
|
|
483
573
|
return object[criterion];
|
|
484
574
|
}
|
|
485
|
-
|
|
486
|
-
return object[criterion.key];
|
|
487
|
-
}
|
|
488
|
-
return getValueByNestedPath(object, criterion.path);
|
|
575
|
+
return object;
|
|
489
576
|
};
|
|
490
577
|
const preparedCriteria = criteria.map(criterion => {
|
|
491
578
|
if (Array.isArray(criterion) && criterion.length === 1) {
|
|
492
579
|
criterion = criterion[0];
|
|
493
580
|
}
|
|
494
|
-
if (typeof criterion === 'function' || Array.isArray(criterion) || isKey(criterion)) {
|
|
581
|
+
if (criterion == null || typeof criterion === 'function' || Array.isArray(criterion) || isKey(criterion)) {
|
|
495
582
|
return criterion;
|
|
496
583
|
}
|
|
497
584
|
return { key: criterion, path: toPath(criterion) };
|
|
498
585
|
});
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
586
|
+
const preparedCollection = collection.map(item => ({
|
|
587
|
+
original: item,
|
|
588
|
+
criteria: preparedCriteria.map(criterion => getValueByCriterion(criterion, item)),
|
|
589
|
+
}));
|
|
590
|
+
return preparedCollection
|
|
591
|
+
.slice()
|
|
592
|
+
.sort((a, b) => {
|
|
593
|
+
for (let i = 0; i < preparedCriteria.length; i++) {
|
|
594
|
+
const comparedResult = compareValues(a.criteria[i], b.criteria[i], orders[i]);
|
|
505
595
|
if (comparedResult !== 0) {
|
|
506
596
|
return comparedResult;
|
|
507
597
|
}
|
|
508
598
|
}
|
|
509
599
|
return 0;
|
|
510
|
-
})
|
|
600
|
+
})
|
|
601
|
+
.map(item => item.original);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
function sortBy(collection, criteria) {
|
|
605
|
+
return orderBy(collection, criteria, ['asc']);
|
|
511
606
|
}
|
|
512
607
|
|
|
513
608
|
function size(target) {
|
|
514
|
-
if (
|
|
609
|
+
if (isWeakSet$1.isNil(target)) {
|
|
515
610
|
return 0;
|
|
516
611
|
}
|
|
517
612
|
if (target instanceof Map || target instanceof Set) {
|
|
@@ -520,6 +615,40 @@ function size(target) {
|
|
|
520
615
|
return Object.keys(target).length;
|
|
521
616
|
}
|
|
522
617
|
|
|
618
|
+
function identity(x) {
|
|
619
|
+
return x;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
function some(arr, predicate, guard) {
|
|
623
|
+
if (guard != null) {
|
|
624
|
+
predicate = undefined;
|
|
625
|
+
}
|
|
626
|
+
if (!predicate) {
|
|
627
|
+
predicate = identity;
|
|
628
|
+
}
|
|
629
|
+
if (!Array.isArray(arr)) {
|
|
630
|
+
return false;
|
|
631
|
+
}
|
|
632
|
+
switch (typeof predicate) {
|
|
633
|
+
case 'function': {
|
|
634
|
+
return arr.some(predicate);
|
|
635
|
+
}
|
|
636
|
+
case 'object': {
|
|
637
|
+
if (Array.isArray(predicate) && predicate.length === 2) {
|
|
638
|
+
const key = predicate[0];
|
|
639
|
+
const value = predicate[1];
|
|
640
|
+
return arr.some(matchesProperty(key, value));
|
|
641
|
+
}
|
|
642
|
+
else {
|
|
643
|
+
return arr.some(matches(predicate));
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
case 'string': {
|
|
647
|
+
return arr.some(property(predicate));
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
523
652
|
function set(obj, path, value) {
|
|
524
653
|
const resolvedPath = Array.isArray(path) ? path : typeof path === 'string' ? toPath(path) : [path];
|
|
525
654
|
let current = obj;
|
|
@@ -538,7 +667,7 @@ function set(obj, path, value) {
|
|
|
538
667
|
|
|
539
668
|
function zipObjectDeep(keys, values) {
|
|
540
669
|
const result = {};
|
|
541
|
-
const zipped =
|
|
670
|
+
const zipped = zipWith.zip(keys, values);
|
|
542
671
|
for (let i = 0; i < zipped.length; i++) {
|
|
543
672
|
const [key, value] = zipped[i];
|
|
544
673
|
if (key != null) {
|
|
@@ -548,25 +677,6 @@ function zipObjectDeep(keys, values) {
|
|
|
548
677
|
return result;
|
|
549
678
|
}
|
|
550
679
|
|
|
551
|
-
function indexOf(array, searchElement, fromIndex) {
|
|
552
|
-
if (array == null) {
|
|
553
|
-
return -1;
|
|
554
|
-
}
|
|
555
|
-
if (Number.isNaN(searchElement)) {
|
|
556
|
-
fromIndex = fromIndex ?? 0;
|
|
557
|
-
if (fromIndex < 0) {
|
|
558
|
-
fromIndex = Math.max(0, array.length + fromIndex);
|
|
559
|
-
}
|
|
560
|
-
for (let i = fromIndex; i < array.length; i++) {
|
|
561
|
-
if (Number.isNaN(array[i])) {
|
|
562
|
-
return i;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
return -1;
|
|
566
|
-
}
|
|
567
|
-
return array.indexOf(searchElement, fromIndex);
|
|
568
|
-
}
|
|
569
|
-
|
|
570
680
|
function ary(func, n = func.length, guard) {
|
|
571
681
|
if (guard) {
|
|
572
682
|
n = func.length;
|
|
@@ -574,7 +684,7 @@ function ary(func, n = func.length, guard) {
|
|
|
574
684
|
if (Number.isNaN(n) || n < 0) {
|
|
575
685
|
n = 0;
|
|
576
686
|
}
|
|
577
|
-
return
|
|
687
|
+
return rest$1.ary(func, n);
|
|
578
688
|
}
|
|
579
689
|
|
|
580
690
|
function bind(func, thisObj, ...partialArgs) {
|
|
@@ -603,16 +713,73 @@ function bind(func, thisObj, ...partialArgs) {
|
|
|
603
713
|
const bindPlaceholder = Symbol('bind.placeholder');
|
|
604
714
|
bind.placeholder = bindPlaceholder;
|
|
605
715
|
|
|
716
|
+
function bindKey(object, key, ...partialArgs) {
|
|
717
|
+
const bound = function (...providedArgs) {
|
|
718
|
+
const args = [];
|
|
719
|
+
let startIndex = 0;
|
|
720
|
+
for (let i = 0; i < partialArgs.length; i++) {
|
|
721
|
+
const arg = partialArgs[i];
|
|
722
|
+
if (arg === bindKey.placeholder) {
|
|
723
|
+
args.push(providedArgs[startIndex++]);
|
|
724
|
+
}
|
|
725
|
+
else {
|
|
726
|
+
args.push(arg);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
for (let i = startIndex; i < providedArgs.length; i++) {
|
|
730
|
+
args.push(providedArgs[i]);
|
|
731
|
+
}
|
|
732
|
+
if (this instanceof bound) {
|
|
733
|
+
return new object[key](...args);
|
|
734
|
+
}
|
|
735
|
+
return object[key].apply(object, args);
|
|
736
|
+
};
|
|
737
|
+
return bound;
|
|
738
|
+
}
|
|
739
|
+
const bindKeyPlaceholder = Symbol('bindKey.placeholder');
|
|
740
|
+
bindKey.placeholder = bindKeyPlaceholder;
|
|
741
|
+
|
|
606
742
|
function rest(func, start = func.length - 1) {
|
|
607
743
|
start = Number.parseInt(start, 10);
|
|
608
744
|
if (Number.isNaN(start) || start < 0) {
|
|
609
745
|
start = func.length - 1;
|
|
610
746
|
}
|
|
611
|
-
return
|
|
747
|
+
return rest$1.rest(func, start);
|
|
612
748
|
}
|
|
613
749
|
|
|
614
|
-
function
|
|
615
|
-
|
|
750
|
+
function spread(func, argsIndex = 0) {
|
|
751
|
+
argsIndex = Number.parseInt(argsIndex, 10);
|
|
752
|
+
if (Number.isNaN(argsIndex) || argsIndex < 0) {
|
|
753
|
+
argsIndex = 0;
|
|
754
|
+
}
|
|
755
|
+
return function (...args) {
|
|
756
|
+
const array = args[argsIndex];
|
|
757
|
+
const params = args.slice(0, argsIndex);
|
|
758
|
+
if (array) {
|
|
759
|
+
params.push(...array);
|
|
760
|
+
}
|
|
761
|
+
return func.apply(this, params);
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
function attempt(func, ...args) {
|
|
766
|
+
try {
|
|
767
|
+
return func(...args);
|
|
768
|
+
}
|
|
769
|
+
catch (e) {
|
|
770
|
+
return e instanceof Error ? e : new Error(e);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
function rearg(func, ...indices) {
|
|
775
|
+
const flattenIndices = flatten(indices);
|
|
776
|
+
return function (...args) {
|
|
777
|
+
const reorderedArgs = flattenIndices.map(i => args[i]).slice(0, args.length);
|
|
778
|
+
for (let i = reorderedArgs.length; i < args.length; i++) {
|
|
779
|
+
reorderedArgs.push(args[i]);
|
|
780
|
+
}
|
|
781
|
+
return func.apply(this, reorderedArgs);
|
|
782
|
+
};
|
|
616
783
|
}
|
|
617
784
|
|
|
618
785
|
function mapKeys(object, getNewKey) {
|
|
@@ -742,48 +909,107 @@ function mergeWithDeep(target, source, merge, stack) {
|
|
|
742
909
|
}
|
|
743
910
|
|
|
744
911
|
function merge(object, ...sources) {
|
|
745
|
-
return mergeWith(object, ...sources,
|
|
912
|
+
return mergeWith(object, ...sources, rest$1.noop);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
function isArrayLike(value) {
|
|
916
|
+
return value != null && typeof value !== 'function' && isWeakSet$1.isLength(value.length);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
function fromPairs(pairs) {
|
|
920
|
+
if (!isArrayLike(pairs) && !(pairs instanceof Map)) {
|
|
921
|
+
return {};
|
|
922
|
+
}
|
|
923
|
+
const result = {};
|
|
924
|
+
for (const [key, value] of pairs) {
|
|
925
|
+
result[key] = value;
|
|
926
|
+
}
|
|
927
|
+
return result;
|
|
746
928
|
}
|
|
747
929
|
|
|
748
930
|
function isArray(value) {
|
|
749
931
|
return Array.isArray(value);
|
|
750
932
|
}
|
|
751
933
|
|
|
752
|
-
function
|
|
753
|
-
return value
|
|
934
|
+
function isObject(value) {
|
|
935
|
+
return value !== null && (typeof value === 'object' || typeof value === 'function');
|
|
754
936
|
}
|
|
755
937
|
|
|
756
938
|
function isBoolean(x) {
|
|
757
939
|
if (x === true || x === false) {
|
|
758
940
|
return true;
|
|
759
941
|
}
|
|
760
|
-
if (typeof x === 'object' && x != null &&
|
|
942
|
+
if (typeof x === 'object' && x != null && isWeakSet$1.getTag(x) === '[object Boolean]') {
|
|
761
943
|
return true;
|
|
762
944
|
}
|
|
763
945
|
return false;
|
|
764
946
|
}
|
|
765
947
|
|
|
766
948
|
function isRegExp(value) {
|
|
767
|
-
return
|
|
949
|
+
return isWeakSet$1.getTag(value) === '[object RegExp]';
|
|
768
950
|
}
|
|
769
951
|
|
|
770
952
|
function isString(value) {
|
|
771
953
|
if (typeof value === 'string') {
|
|
772
954
|
return true;
|
|
773
955
|
}
|
|
774
|
-
if (typeof value === 'object' && value != null &&
|
|
956
|
+
if (typeof value === 'object' && value != null && isWeakSet$1.getTag(value) === '[object String]') {
|
|
775
957
|
return true;
|
|
776
958
|
}
|
|
777
959
|
return false;
|
|
778
960
|
}
|
|
779
961
|
|
|
780
|
-
|
|
962
|
+
function isWeakMap(value) {
|
|
963
|
+
return isWeakSet$1.isWeakMap(value);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
function isWeakSet(value) {
|
|
967
|
+
return isWeakSet$1.isWeakSet(value);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
function conformsTo(target, source) {
|
|
971
|
+
if (source == null) {
|
|
972
|
+
return true;
|
|
973
|
+
}
|
|
974
|
+
if (target == null) {
|
|
975
|
+
return Object.keys(source).length === 0;
|
|
976
|
+
}
|
|
977
|
+
for (const key of Object.keys(source)) {
|
|
978
|
+
const predicate = source[key];
|
|
979
|
+
const value = target[key];
|
|
980
|
+
if ((value === undefined && !(key in target)) || !predicate(value)) {
|
|
981
|
+
return false;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
return true;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
function conforms(source) {
|
|
988
|
+
source = toMerged.cloneDeep(source);
|
|
989
|
+
return function (object) {
|
|
990
|
+
return conformsTo(object, source);
|
|
991
|
+
};
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
function normalizeForCase(str) {
|
|
995
|
+
if (typeof str === 'object') {
|
|
996
|
+
str = str.toString();
|
|
997
|
+
}
|
|
998
|
+
str = str.replace(/['\u2019]/g, '');
|
|
999
|
+
return str;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
function camelCase(str) {
|
|
1003
|
+
return string_index.camelCase(normalizeForCase(str));
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
function startsWith(str, target, position = 0) {
|
|
781
1007
|
return str.startsWith(target, position);
|
|
782
|
-
}
|
|
1008
|
+
}
|
|
783
1009
|
|
|
784
|
-
|
|
1010
|
+
function endsWith(str, target, position = str.length) {
|
|
785
1011
|
return str.endsWith(target, position);
|
|
786
|
-
}
|
|
1012
|
+
}
|
|
787
1013
|
|
|
788
1014
|
function padStart(str, length = 0, chars = ' ') {
|
|
789
1015
|
return str.padStart(length, chars);
|
|
@@ -793,6 +1019,10 @@ function padEnd(str, length = 0, chars = ' ') {
|
|
|
793
1019
|
return str.padEnd(length, chars);
|
|
794
1020
|
}
|
|
795
1021
|
|
|
1022
|
+
function repeat(str, n) {
|
|
1023
|
+
return str.repeat(n);
|
|
1024
|
+
}
|
|
1025
|
+
|
|
796
1026
|
function max(items = []) {
|
|
797
1027
|
let maxElement = items[0];
|
|
798
1028
|
let max = undefined;
|
|
@@ -817,72 +1047,79 @@ function min(items = []) {
|
|
|
817
1047
|
return minElement;
|
|
818
1048
|
}
|
|
819
1049
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
exports.
|
|
828
|
-
exports.
|
|
829
|
-
exports.
|
|
830
|
-
exports.
|
|
831
|
-
exports.
|
|
832
|
-
exports.
|
|
833
|
-
exports.
|
|
834
|
-
exports.
|
|
835
|
-
exports.
|
|
836
|
-
exports.
|
|
837
|
-
exports.
|
|
838
|
-
exports.
|
|
839
|
-
exports.
|
|
840
|
-
exports.
|
|
841
|
-
exports.
|
|
842
|
-
exports.
|
|
843
|
-
exports.
|
|
844
|
-
exports.
|
|
845
|
-
exports.
|
|
846
|
-
exports.
|
|
847
|
-
exports.
|
|
848
|
-
exports.
|
|
849
|
-
exports.
|
|
850
|
-
exports.
|
|
851
|
-
exports.
|
|
852
|
-
exports.
|
|
853
|
-
exports.
|
|
854
|
-
exports.
|
|
855
|
-
exports.
|
|
856
|
-
exports.
|
|
857
|
-
exports.
|
|
858
|
-
exports.
|
|
859
|
-
exports.
|
|
860
|
-
exports.
|
|
861
|
-
exports.
|
|
862
|
-
exports.
|
|
863
|
-
exports.
|
|
864
|
-
exports.
|
|
865
|
-
exports.
|
|
866
|
-
exports.
|
|
867
|
-
exports.
|
|
868
|
-
exports.
|
|
869
|
-
exports.
|
|
1050
|
+
function parseInt(string, radix = 0, guard) {
|
|
1051
|
+
if (guard) {
|
|
1052
|
+
radix = 0;
|
|
1053
|
+
}
|
|
1054
|
+
return Number.parseInt(string, radix);
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
exports.at = zipWith.at;
|
|
1058
|
+
exports.compact = zipWith.compact;
|
|
1059
|
+
exports.countBy = zipWith.countBy;
|
|
1060
|
+
exports.differenceBy = zipWith.differenceBy;
|
|
1061
|
+
exports.differenceWith = zipWith.differenceWith;
|
|
1062
|
+
exports.drop = zipWith.drop;
|
|
1063
|
+
exports.dropRight = zipWith.dropRight;
|
|
1064
|
+
exports.dropRightWhile = zipWith.dropRightWhile;
|
|
1065
|
+
exports.dropWhile = zipWith.dropWhile;
|
|
1066
|
+
exports.first = zipWith.head;
|
|
1067
|
+
exports.flatMap = zipWith.flatMap;
|
|
1068
|
+
exports.flatMapDeep = zipWith.flatMapDeep;
|
|
1069
|
+
exports.forEachRight = zipWith.forEachRight;
|
|
1070
|
+
exports.groupBy = zipWith.groupBy;
|
|
1071
|
+
exports.head = zipWith.head;
|
|
1072
|
+
exports.initial = zipWith.initial;
|
|
1073
|
+
exports.intersection = zipWith.intersection;
|
|
1074
|
+
exports.intersectionBy = zipWith.intersectionBy;
|
|
1075
|
+
exports.intersectionWith = zipWith.intersectionWith;
|
|
1076
|
+
exports.isSubset = zipWith.isSubset;
|
|
1077
|
+
exports.keyBy = zipWith.keyBy;
|
|
1078
|
+
exports.last = zipWith.last;
|
|
1079
|
+
exports.maxBy = zipWith.maxBy;
|
|
1080
|
+
exports.minBy = zipWith.minBy;
|
|
1081
|
+
exports.partition = zipWith.partition;
|
|
1082
|
+
exports.pullAt = zipWith.pullAt;
|
|
1083
|
+
exports.sample = zipWith.sample;
|
|
1084
|
+
exports.sampleSize = zipWith.sampleSize;
|
|
1085
|
+
exports.shuffle = zipWith.shuffle;
|
|
1086
|
+
exports.tail = zipWith.tail;
|
|
1087
|
+
exports.take = zipWith.take;
|
|
1088
|
+
exports.takeRight = zipWith.takeRight;
|
|
1089
|
+
exports.takeRightWhile = zipWith.takeRightWhile;
|
|
1090
|
+
exports.takeWhile = zipWith.takeWhile;
|
|
1091
|
+
exports.toFilled = zipWith.toFilled;
|
|
1092
|
+
exports.union = zipWith.union;
|
|
1093
|
+
exports.unionBy = zipWith.unionBy;
|
|
1094
|
+
exports.unionWith = zipWith.unionWith;
|
|
1095
|
+
exports.uniq = zipWith.uniq;
|
|
1096
|
+
exports.uniqBy = zipWith.uniqBy;
|
|
1097
|
+
exports.uniqWith = zipWith.uniqWith;
|
|
1098
|
+
exports.unzip = zipWith.unzip;
|
|
1099
|
+
exports.unzipWith = zipWith.unzipWith;
|
|
1100
|
+
exports.without = zipWith.without;
|
|
1101
|
+
exports.xor = zipWith.xor;
|
|
1102
|
+
exports.xorBy = zipWith.xorBy;
|
|
1103
|
+
exports.xorWith = zipWith.xorWith;
|
|
1104
|
+
exports.zip = zipWith.zip;
|
|
1105
|
+
exports.zipObject = zipWith.zipObject;
|
|
1106
|
+
exports.zipWith = zipWith.zipWith;
|
|
870
1107
|
exports.AbortError = promise_index.AbortError;
|
|
871
1108
|
exports.TimeoutError = promise_index.TimeoutError;
|
|
872
1109
|
exports.delay = promise_index.delay;
|
|
873
1110
|
exports.timeout = promise_index.timeout;
|
|
874
1111
|
exports.withTimeout = promise_index.withTimeout;
|
|
875
|
-
exports.after =
|
|
876
|
-
exports.before =
|
|
877
|
-
exports.debounce =
|
|
878
|
-
exports.memoize =
|
|
879
|
-
exports.negate =
|
|
880
|
-
exports.noop =
|
|
881
|
-
exports.once =
|
|
882
|
-
exports.partial =
|
|
883
|
-
exports.partialRight =
|
|
884
|
-
exports.throttle =
|
|
885
|
-
exports.unary =
|
|
1112
|
+
exports.after = rest$1.after;
|
|
1113
|
+
exports.before = rest$1.before;
|
|
1114
|
+
exports.debounce = rest$1.debounce;
|
|
1115
|
+
exports.memoize = rest$1.memoize;
|
|
1116
|
+
exports.negate = rest$1.negate;
|
|
1117
|
+
exports.noop = rest$1.noop;
|
|
1118
|
+
exports.once = rest$1.once;
|
|
1119
|
+
exports.partial = rest$1.partial;
|
|
1120
|
+
exports.partialRight = rest$1.partialRight;
|
|
1121
|
+
exports.throttle = rest$1.throttle;
|
|
1122
|
+
exports.unary = rest$1.unary;
|
|
886
1123
|
exports.clamp = math_index.clamp;
|
|
887
1124
|
exports.inRange = math_index.inRange;
|
|
888
1125
|
exports.mean = math_index.mean;
|
|
@@ -903,36 +1140,47 @@ exports.omitBy = toMerged.omitBy;
|
|
|
903
1140
|
exports.pick = toMerged.pick;
|
|
904
1141
|
exports.pickBy = toMerged.pickBy;
|
|
905
1142
|
exports.toMerged = toMerged.toMerged;
|
|
906
|
-
exports.isEqual =
|
|
907
|
-
exports.isFunction =
|
|
908
|
-
exports.isLength =
|
|
909
|
-
exports.isNil =
|
|
910
|
-
exports.isNotNil =
|
|
911
|
-
exports.isNull =
|
|
912
|
-
exports.isUndefined =
|
|
1143
|
+
exports.isEqual = isWeakSet$1.isEqual;
|
|
1144
|
+
exports.isFunction = isWeakSet$1.isFunction;
|
|
1145
|
+
exports.isLength = isWeakSet$1.isLength;
|
|
1146
|
+
exports.isNil = isWeakSet$1.isNil;
|
|
1147
|
+
exports.isNotNil = isWeakSet$1.isNotNil;
|
|
1148
|
+
exports.isNull = isWeakSet$1.isNull;
|
|
1149
|
+
exports.isUndefined = isWeakSet$1.isUndefined;
|
|
913
1150
|
exports.isPrimitive = isTypedArray$1.isPrimitive;
|
|
914
|
-
exports.camelCase = string_index.camelCase;
|
|
915
1151
|
exports.capitalize = string_index.capitalize;
|
|
916
1152
|
exports.deburr = string_index.deburr;
|
|
1153
|
+
exports.escape = string_index.escape;
|
|
1154
|
+
exports.escapeRegExp = string_index.escapeRegExp;
|
|
917
1155
|
exports.kebabCase = string_index.kebabCase;
|
|
918
1156
|
exports.lowerCase = string_index.lowerCase;
|
|
919
1157
|
exports.lowerFirst = string_index.lowerFirst;
|
|
1158
|
+
exports.pad = string_index.pad;
|
|
920
1159
|
exports.pascalCase = string_index.pascalCase;
|
|
921
1160
|
exports.snakeCase = string_index.snakeCase;
|
|
922
1161
|
exports.startCase = string_index.startCase;
|
|
1162
|
+
exports.unescape = string_index.unescape;
|
|
923
1163
|
exports.upperFirst = string_index.upperFirst;
|
|
924
1164
|
exports.ary = ary;
|
|
1165
|
+
exports.attempt = attempt;
|
|
925
1166
|
exports.bind = bind;
|
|
1167
|
+
exports.bindKey = bindKey;
|
|
1168
|
+
exports.camelCase = camelCase;
|
|
1169
|
+
exports.castArray = castArray;
|
|
926
1170
|
exports.chunk = chunk;
|
|
927
1171
|
exports.concat = concat;
|
|
1172
|
+
exports.conforms = conforms;
|
|
1173
|
+
exports.conformsTo = conformsTo;
|
|
928
1174
|
exports.difference = difference;
|
|
929
1175
|
exports.endsWith = endsWith;
|
|
930
1176
|
exports.fill = fill;
|
|
931
1177
|
exports.find = find;
|
|
932
1178
|
exports.findIndex = findIndex;
|
|
1179
|
+
exports.findLastIndex = findLastIndex;
|
|
933
1180
|
exports.flatten = flatten;
|
|
934
1181
|
exports.flattenDeep = flattenDeep;
|
|
935
1182
|
exports.flattenDepth = flattenDepth;
|
|
1183
|
+
exports.fromPairs = fromPairs;
|
|
936
1184
|
exports.get = get;
|
|
937
1185
|
exports.has = has;
|
|
938
1186
|
exports.indexOf = indexOf;
|
|
@@ -941,11 +1189,15 @@ exports.isArray = isArray;
|
|
|
941
1189
|
exports.isArrayLike = isArrayLike;
|
|
942
1190
|
exports.isBoolean = isBoolean;
|
|
943
1191
|
exports.isMatch = isMatch;
|
|
1192
|
+
exports.isObject = isObject;
|
|
944
1193
|
exports.isPlainObject = isPlainObject;
|
|
945
1194
|
exports.isRegExp = isRegExp;
|
|
946
1195
|
exports.isString = isString;
|
|
947
1196
|
exports.isSymbol = isSymbol;
|
|
948
1197
|
exports.isTypedArray = isTypedArray;
|
|
1198
|
+
exports.isWeakMap = isWeakMap;
|
|
1199
|
+
exports.isWeakSet = isWeakSet;
|
|
1200
|
+
exports.join = join;
|
|
949
1201
|
exports.mapKeys = mapKeys;
|
|
950
1202
|
exports.mapValues = mapValues;
|
|
951
1203
|
exports.matches = matches;
|
|
@@ -957,9 +1209,15 @@ exports.min = min;
|
|
|
957
1209
|
exports.orderBy = orderBy;
|
|
958
1210
|
exports.padEnd = padEnd;
|
|
959
1211
|
exports.padStart = padStart;
|
|
1212
|
+
exports.parseInt = parseInt;
|
|
960
1213
|
exports.property = property;
|
|
1214
|
+
exports.rearg = rearg;
|
|
1215
|
+
exports.repeat = repeat;
|
|
961
1216
|
exports.rest = rest;
|
|
962
1217
|
exports.set = set;
|
|
963
1218
|
exports.size = size;
|
|
1219
|
+
exports.some = some;
|
|
1220
|
+
exports.sortBy = sortBy;
|
|
1221
|
+
exports.spread = spread;
|
|
964
1222
|
exports.startsWith = startsWith;
|
|
965
1223
|
exports.zipObjectDeep = zipObjectDeep;
|