es-toolkit 1.35.0-dev.1172 → 1.35.0-dev.1174
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/dist/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/compat/array/find.mjs +3 -3
- package/dist/compat/array/findLast.mjs +2 -2
- package/dist/compat/index.js +61 -61
- package/dist/index.js +27 -27
- package/dist/predicate/index.js +27 -27
- package/package.json +1 -1
- package/dist/_chunk/{isWeakSet-caD_fm.js → isPromise-ByAybB.js} +49 -49
|
@@ -8,10 +8,9 @@ function find(source, _doesMatch, fromIndex = 0) {
|
|
|
8
8
|
fromIndex = Math.max(source.length + fromIndex, 0);
|
|
9
9
|
}
|
|
10
10
|
const doesMatch = iteratee(_doesMatch);
|
|
11
|
-
const values = Array.isArray(source) ? source.slice(fromIndex) : Object.values(source).slice(fromIndex);
|
|
12
11
|
if (typeof doesMatch === 'function' && !Array.isArray(source)) {
|
|
13
|
-
const keys = Object.keys(source)
|
|
14
|
-
for (let i =
|
|
12
|
+
const keys = Object.keys(source);
|
|
13
|
+
for (let i = fromIndex; i < keys.length; i++) {
|
|
15
14
|
const key = keys[i];
|
|
16
15
|
const value = source[key];
|
|
17
16
|
if (doesMatch(value, key, source)) {
|
|
@@ -20,6 +19,7 @@ function find(source, _doesMatch, fromIndex = 0) {
|
|
|
20
19
|
}
|
|
21
20
|
return undefined;
|
|
22
21
|
}
|
|
22
|
+
const values = Array.isArray(source) ? source.slice(fromIndex) : Object.values(source).slice(fromIndex);
|
|
23
23
|
return values.find(doesMatch);
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -14,9 +14,8 @@ function findLast(source, _doesMatch, fromIndex) {
|
|
|
14
14
|
fromIndex = Math.min(fromIndex, length - 1);
|
|
15
15
|
}
|
|
16
16
|
const doesMatch = iteratee(_doesMatch);
|
|
17
|
-
const values = Array.isArray(source) ? source.slice(0, fromIndex + 1) : Object.values(source).slice(0, fromIndex + 1);
|
|
18
17
|
if (typeof doesMatch === 'function' && !Array.isArray(source)) {
|
|
19
|
-
const keys = Object.keys(source)
|
|
18
|
+
const keys = Object.keys(source);
|
|
20
19
|
for (let i = fromIndex; i >= 0; i--) {
|
|
21
20
|
const key = keys[i];
|
|
22
21
|
const value = source[key];
|
|
@@ -26,6 +25,7 @@ function findLast(source, _doesMatch, fromIndex) {
|
|
|
26
25
|
}
|
|
27
26
|
return undefined;
|
|
28
27
|
}
|
|
28
|
+
const values = Array.isArray(source) ? source.slice(0, fromIndex + 1) : Object.values(source).slice(0, fromIndex + 1);
|
|
29
29
|
return values.findLast(doesMatch);
|
|
30
30
|
}
|
|
31
31
|
|
package/dist/compat/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const range$1 = require('../_chunk/range-HnEIT7.js');
|
|
|
12
12
|
const randomInt = require('../_chunk/randomInt-CF7bZK.js');
|
|
13
13
|
const toSnakeCaseKeys = require('../_chunk/toSnakeCaseKeys-BNpS71.js');
|
|
14
14
|
const isPlainObject = require('../_chunk/isPlainObject-Xaozpc.js');
|
|
15
|
-
const
|
|
15
|
+
const isPromise = require('../_chunk/isPromise-ByAybB.js');
|
|
16
16
|
const promise_index = require('../promise/index.js');
|
|
17
17
|
const snakeCase$1 = require('../_chunk/snakeCase-BtVEeB.js');
|
|
18
18
|
const reverseString = require('../_chunk/reverseString-D-wK2p.js');
|
|
@@ -30,7 +30,7 @@ function toArray$1(value) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function isArrayLike(value) {
|
|
33
|
-
return value != null && typeof value !== 'function' &&
|
|
33
|
+
return value != null && typeof value !== 'function' && isPromise.isLength(value.length);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function chunk(arr, size = 1) {
|
|
@@ -301,7 +301,7 @@ function isMatch(target, source) {
|
|
|
301
301
|
}
|
|
302
302
|
default: {
|
|
303
303
|
if (!isObject(target)) {
|
|
304
|
-
return
|
|
304
|
+
return isPromise.eq(target, source);
|
|
305
305
|
}
|
|
306
306
|
return !source;
|
|
307
307
|
}
|
|
@@ -621,7 +621,7 @@ function isIterateeCall(value, index, object) {
|
|
|
621
621
|
}
|
|
622
622
|
if ((typeof index === 'number' && isArrayLike(object) && isIndex(index) && index < object.length) ||
|
|
623
623
|
(typeof index === 'string' && index in object)) {
|
|
624
|
-
return
|
|
624
|
+
return isPromise.eq(object[index], value);
|
|
625
625
|
}
|
|
626
626
|
return false;
|
|
627
627
|
}
|
|
@@ -722,10 +722,9 @@ function find(source, _doesMatch, fromIndex = 0) {
|
|
|
722
722
|
fromIndex = Math.max(source.length + fromIndex, 0);
|
|
723
723
|
}
|
|
724
724
|
const doesMatch = iteratee(_doesMatch);
|
|
725
|
-
const values = Array.isArray(source) ? source.slice(fromIndex) : Object.values(source).slice(fromIndex);
|
|
726
725
|
if (typeof doesMatch === 'function' && !Array.isArray(source)) {
|
|
727
|
-
const keys = Object.keys(source)
|
|
728
|
-
for (let i =
|
|
726
|
+
const keys = Object.keys(source);
|
|
727
|
+
for (let i = fromIndex; i < keys.length; i++) {
|
|
729
728
|
const key = keys[i];
|
|
730
729
|
const value = source[key];
|
|
731
730
|
if (doesMatch(value, key, source)) {
|
|
@@ -734,6 +733,7 @@ function find(source, _doesMatch, fromIndex = 0) {
|
|
|
734
733
|
}
|
|
735
734
|
return undefined;
|
|
736
735
|
}
|
|
736
|
+
const values = Array.isArray(source) ? source.slice(fromIndex) : Object.values(source).slice(fromIndex);
|
|
737
737
|
return values.find(doesMatch);
|
|
738
738
|
}
|
|
739
739
|
|
|
@@ -784,9 +784,8 @@ function findLast(source, _doesMatch, fromIndex) {
|
|
|
784
784
|
fromIndex = Math.min(fromIndex, length - 1);
|
|
785
785
|
}
|
|
786
786
|
const doesMatch = iteratee(_doesMatch);
|
|
787
|
-
const values = Array.isArray(source) ? source.slice(0, fromIndex + 1) : Object.values(source).slice(0, fromIndex + 1);
|
|
788
787
|
if (typeof doesMatch === 'function' && !Array.isArray(source)) {
|
|
789
|
-
const keys = Object.keys(source)
|
|
788
|
+
const keys = Object.keys(source);
|
|
790
789
|
for (let i = fromIndex; i >= 0; i--) {
|
|
791
790
|
const key = keys[i];
|
|
792
791
|
const value = source[key];
|
|
@@ -796,6 +795,7 @@ function findLast(source, _doesMatch, fromIndex) {
|
|
|
796
795
|
}
|
|
797
796
|
return undefined;
|
|
798
797
|
}
|
|
798
|
+
const values = Array.isArray(source) ? source.slice(0, fromIndex + 1) : Object.values(source).slice(0, fromIndex + 1);
|
|
799
799
|
return values.findLast(doesMatch);
|
|
800
800
|
}
|
|
801
801
|
|
|
@@ -877,10 +877,10 @@ function map(collection, _iteratee) {
|
|
|
877
877
|
}
|
|
878
878
|
|
|
879
879
|
function flatMap(collection, iteratee) {
|
|
880
|
-
if (
|
|
880
|
+
if (isPromise.isNil(collection)) {
|
|
881
881
|
return [];
|
|
882
882
|
}
|
|
883
|
-
const mapped =
|
|
883
|
+
const mapped = isPromise.isNil(iteratee) ? map(collection) : map(collection, iteratee);
|
|
884
884
|
return flatten(mapped, 1);
|
|
885
885
|
}
|
|
886
886
|
|
|
@@ -943,7 +943,7 @@ function includes(source, target, fromIndex, guard) {
|
|
|
943
943
|
}
|
|
944
944
|
for (let i = fromIndex; i < keys.length; i++) {
|
|
945
945
|
const value = Reflect.get(source, keys[i]);
|
|
946
|
-
if (
|
|
946
|
+
if (isPromise.eq(value, target)) {
|
|
947
947
|
return true;
|
|
948
948
|
}
|
|
949
949
|
}
|
|
@@ -1027,7 +1027,7 @@ function intersectionWith(firstArr, ...otherArrs) {
|
|
|
1027
1027
|
return [];
|
|
1028
1028
|
}
|
|
1029
1029
|
const _comparator = last(otherArrs);
|
|
1030
|
-
let comparator =
|
|
1030
|
+
let comparator = isPromise.eq;
|
|
1031
1031
|
let uniq$1 = uniq;
|
|
1032
1032
|
if (typeof _comparator === 'function') {
|
|
1033
1033
|
comparator = _comparator;
|
|
@@ -1375,7 +1375,7 @@ function sample(collection) {
|
|
|
1375
1375
|
}
|
|
1376
1376
|
|
|
1377
1377
|
function size(target) {
|
|
1378
|
-
if (
|
|
1378
|
+
if (isPromise.isNil(target)) {
|
|
1379
1379
|
return 0;
|
|
1380
1380
|
}
|
|
1381
1381
|
if (target instanceof Map || target instanceof Set) {
|
|
@@ -1492,15 +1492,15 @@ function sortedIndexBy(array, value, iteratee$1, retHighest) {
|
|
|
1492
1492
|
const iterateeFunction = iteratee(iteratee$1);
|
|
1493
1493
|
const transformedValue = iterateeFunction(value);
|
|
1494
1494
|
const valIsNaN = isNaN(transformedValue);
|
|
1495
|
-
const valIsNull =
|
|
1495
|
+
const valIsNull = isPromise.isNull(transformedValue);
|
|
1496
1496
|
const valIsSymbol = isSymbol(transformedValue);
|
|
1497
|
-
const valIsUndefined =
|
|
1497
|
+
const valIsUndefined = isPromise.isUndefined(transformedValue);
|
|
1498
1498
|
while (low < high) {
|
|
1499
1499
|
let setLow;
|
|
1500
1500
|
const mid = Math.floor((low + high) / 2);
|
|
1501
1501
|
const computed = iterateeFunction(array[mid]);
|
|
1502
|
-
const othIsDefined = !
|
|
1503
|
-
const othIsNull =
|
|
1502
|
+
const othIsDefined = !isPromise.isUndefined(computed);
|
|
1503
|
+
const othIsNull = isPromise.isNull(computed);
|
|
1504
1504
|
const othIsReflexive = !isNaN(computed);
|
|
1505
1505
|
const othIsSymbol = isSymbol(computed);
|
|
1506
1506
|
if (valIsNaN) {
|
|
@@ -1538,15 +1538,15 @@ function isNumber(value) {
|
|
|
1538
1538
|
const MAX_ARRAY_LENGTH$2 = 4294967295;
|
|
1539
1539
|
const HALF_MAX_ARRAY_LENGTH$1 = MAX_ARRAY_LENGTH$2 >>> 1;
|
|
1540
1540
|
function sortedIndex(array, value) {
|
|
1541
|
-
if (
|
|
1541
|
+
if (isPromise.isNil(array)) {
|
|
1542
1542
|
return 0;
|
|
1543
1543
|
}
|
|
1544
|
-
let low = 0, high =
|
|
1544
|
+
let low = 0, high = isPromise.isNil(array) ? low : array.length;
|
|
1545
1545
|
if (isNumber(value) && value === value && high <= HALF_MAX_ARRAY_LENGTH$1) {
|
|
1546
1546
|
while (low < high) {
|
|
1547
1547
|
const mid = (low + high) >>> 1;
|
|
1548
1548
|
const compute = array[mid];
|
|
1549
|
-
if (!
|
|
1549
|
+
if (!isPromise.isNull(compute) && !isPromise.isSymbol(compute) && compute < value) {
|
|
1550
1550
|
low = mid + 1;
|
|
1551
1551
|
}
|
|
1552
1552
|
else {
|
|
@@ -1563,7 +1563,7 @@ function sortedIndexOf(array, value) {
|
|
|
1563
1563
|
return -1;
|
|
1564
1564
|
}
|
|
1565
1565
|
const index = sortedIndex(array, value);
|
|
1566
|
-
if (index < array.length &&
|
|
1566
|
+
if (index < array.length && isPromise.eq(array[index], value)) {
|
|
1567
1567
|
return index;
|
|
1568
1568
|
}
|
|
1569
1569
|
return -1;
|
|
@@ -1576,7 +1576,7 @@ function sortedLastIndexBy(array, value, iteratee) {
|
|
|
1576
1576
|
const MAX_ARRAY_LENGTH$1 = 4294967295;
|
|
1577
1577
|
const HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH$1 >>> 1;
|
|
1578
1578
|
function sortedLastIndex(array, value) {
|
|
1579
|
-
if (
|
|
1579
|
+
if (isPromise.isNil(array)) {
|
|
1580
1580
|
return 0;
|
|
1581
1581
|
}
|
|
1582
1582
|
let high = array.length;
|
|
@@ -1587,7 +1587,7 @@ function sortedLastIndex(array, value) {
|
|
|
1587
1587
|
while (low < high) {
|
|
1588
1588
|
const mid = (low + high) >>> 1;
|
|
1589
1589
|
const compute = array[mid];
|
|
1590
|
-
if (!
|
|
1590
|
+
if (!isPromise.isNull(compute) && !isPromise.isSymbol(compute) && compute <= value) {
|
|
1591
1591
|
low = mid + 1;
|
|
1592
1592
|
}
|
|
1593
1593
|
else {
|
|
@@ -1701,7 +1701,7 @@ function zip(...arrays) {
|
|
|
1701
1701
|
|
|
1702
1702
|
const assignValue = (object, key, value) => {
|
|
1703
1703
|
const objValue = object[key];
|
|
1704
|
-
if (!(Object.hasOwn(object, key) &&
|
|
1704
|
+
if (!(Object.hasOwn(object, key) && isPromise.eq(objValue, value)) || (value === undefined && !(key in object))) {
|
|
1705
1705
|
object[key] = value;
|
|
1706
1706
|
}
|
|
1707
1707
|
};
|
|
@@ -1774,7 +1774,7 @@ function zipObjectDeep(keys, values) {
|
|
|
1774
1774
|
|
|
1775
1775
|
function zipWith(...combine) {
|
|
1776
1776
|
let iteratee = combine.pop();
|
|
1777
|
-
if (!
|
|
1777
|
+
if (!isPromise.isFunction(iteratee)) {
|
|
1778
1778
|
combine.push(iteratee);
|
|
1779
1779
|
iteratee = undefined;
|
|
1780
1780
|
}
|
|
@@ -2350,7 +2350,7 @@ function keys(object) {
|
|
|
2350
2350
|
function arrayLikeKeys(object) {
|
|
2351
2351
|
const indices = times(object.length, index => `${index}`);
|
|
2352
2352
|
const filteredKeys = new Set(indices);
|
|
2353
|
-
if (
|
|
2353
|
+
if (isPromise.isBuffer(object)) {
|
|
2354
2354
|
filteredKeys.add('offset');
|
|
2355
2355
|
filteredKeys.add('parent');
|
|
2356
2356
|
}
|
|
@@ -2372,7 +2372,7 @@ function assignImpl(object, source) {
|
|
|
2372
2372
|
const keys$1 = keys(source);
|
|
2373
2373
|
for (let i = 0; i < keys$1.length; i++) {
|
|
2374
2374
|
const key = keys$1[i];
|
|
2375
|
-
if (!(key in object) || !
|
|
2375
|
+
if (!(key in object) || !isPromise.eq(object[key], source[key])) {
|
|
2376
2376
|
object[key] = source[key];
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
@@ -2412,7 +2412,7 @@ function prototypeKeysIn(object) {
|
|
|
2412
2412
|
function arrayLikeKeysIn(object) {
|
|
2413
2413
|
const indices = times(object.length, index => `${index}`);
|
|
2414
2414
|
const filteredKeys = new Set(indices);
|
|
2415
|
-
if (
|
|
2415
|
+
if (isPromise.isBuffer(object)) {
|
|
2416
2416
|
filteredKeys.add('offset');
|
|
2417
2417
|
filteredKeys.add('parent');
|
|
2418
2418
|
}
|
|
@@ -2434,7 +2434,7 @@ function assignInImpl(object, source) {
|
|
|
2434
2434
|
const keys = keysIn(source);
|
|
2435
2435
|
for (let i = 0; i < keys.length; i++) {
|
|
2436
2436
|
const key = keys[i];
|
|
2437
|
-
if (!(key in object) || !
|
|
2437
|
+
if (!(key in object) || !isPromise.eq(object[key], source[key])) {
|
|
2438
2438
|
object[key] = source[key];
|
|
2439
2439
|
}
|
|
2440
2440
|
}
|
|
@@ -2460,7 +2460,7 @@ function assignInWithImpl(object, source, getValueToAssign) {
|
|
|
2460
2460
|
const objValue = object[key];
|
|
2461
2461
|
const srcValue = source[key];
|
|
2462
2462
|
const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;
|
|
2463
|
-
if (!(key in object) || !
|
|
2463
|
+
if (!(key in object) || !isPromise.eq(objValue, newValue)) {
|
|
2464
2464
|
object[key] = newValue;
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
@@ -2486,7 +2486,7 @@ function assignWithImpl(object, source, getValueToAssign) {
|
|
|
2486
2486
|
const objValue = object[key];
|
|
2487
2487
|
const srcValue = source[key];
|
|
2488
2488
|
const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;
|
|
2489
|
-
if (!(key in object) || !
|
|
2489
|
+
if (!(key in object) || !isPromise.eq(objValue, newValue)) {
|
|
2490
2490
|
object[key] = newValue;
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
@@ -2537,7 +2537,7 @@ function defaults(object, ...sources) {
|
|
|
2537
2537
|
const key = keys[j];
|
|
2538
2538
|
const value = object[key];
|
|
2539
2539
|
if (value === undefined ||
|
|
2540
|
-
(!Object.hasOwn(object, key) &&
|
|
2540
|
+
(!Object.hasOwn(object, key) && isPromise.eq(value, objectProto[key]))) {
|
|
2541
2541
|
object[key] = source[key];
|
|
2542
2542
|
}
|
|
2543
2543
|
}
|
|
@@ -2592,7 +2592,7 @@ function functionsIn(object) {
|
|
|
2592
2592
|
}
|
|
2593
2593
|
const result = [];
|
|
2594
2594
|
for (const key in object) {
|
|
2595
|
-
if (
|
|
2595
|
+
if (isPromise.isFunction(object[key])) {
|
|
2596
2596
|
result.push(key);
|
|
2597
2597
|
}
|
|
2598
2598
|
}
|
|
@@ -2601,7 +2601,7 @@ function functionsIn(object) {
|
|
|
2601
2601
|
|
|
2602
2602
|
function invertBy(object, iteratee) {
|
|
2603
2603
|
const result = {};
|
|
2604
|
-
if (
|
|
2604
|
+
if (isPromise.isNil(object)) {
|
|
2605
2605
|
return result;
|
|
2606
2606
|
}
|
|
2607
2607
|
if (iteratee == null) {
|
|
@@ -3005,7 +3005,7 @@ function conforms(source) {
|
|
|
3005
3005
|
}
|
|
3006
3006
|
|
|
3007
3007
|
function isArrayBuffer(value) {
|
|
3008
|
-
return
|
|
3008
|
+
return isPromise.isArrayBuffer(value);
|
|
3009
3009
|
}
|
|
3010
3010
|
|
|
3011
3011
|
function isBoolean(value) {
|
|
@@ -3013,11 +3013,11 @@ function isBoolean(value) {
|
|
|
3013
3013
|
}
|
|
3014
3014
|
|
|
3015
3015
|
function isBuffer(x) {
|
|
3016
|
-
return
|
|
3016
|
+
return isPromise.isBuffer(x);
|
|
3017
3017
|
}
|
|
3018
3018
|
|
|
3019
3019
|
function isDate(value) {
|
|
3020
|
-
return
|
|
3020
|
+
return isPromise.isDate(value);
|
|
3021
3021
|
}
|
|
3022
3022
|
|
|
3023
3023
|
function isElement(value) {
|
|
@@ -3055,7 +3055,7 @@ function isEqualWith(a, b, areValuesEqual = noop.noop) {
|
|
|
3055
3055
|
if (typeof areValuesEqual !== 'function') {
|
|
3056
3056
|
areValuesEqual = noop.noop;
|
|
3057
3057
|
}
|
|
3058
|
-
return
|
|
3058
|
+
return isPromise.isEqualWith(a, b, (...args) => {
|
|
3059
3059
|
const result = areValuesEqual(...args);
|
|
3060
3060
|
if (result !== undefined) {
|
|
3061
3061
|
return Boolean(result);
|
|
@@ -3082,11 +3082,11 @@ function isInteger(value) {
|
|
|
3082
3082
|
}
|
|
3083
3083
|
|
|
3084
3084
|
function isMap(value) {
|
|
3085
|
-
return
|
|
3085
|
+
return isPromise.isMap(value);
|
|
3086
3086
|
}
|
|
3087
3087
|
|
|
3088
3088
|
function isRegExp(value) {
|
|
3089
|
-
return
|
|
3089
|
+
return isPromise.isRegExp(value);
|
|
3090
3090
|
}
|
|
3091
3091
|
|
|
3092
3092
|
function isSafeInteger(value) {
|
|
@@ -3094,15 +3094,15 @@ function isSafeInteger(value) {
|
|
|
3094
3094
|
}
|
|
3095
3095
|
|
|
3096
3096
|
function isSet(value) {
|
|
3097
|
-
return
|
|
3097
|
+
return isPromise.isSet(value);
|
|
3098
3098
|
}
|
|
3099
3099
|
|
|
3100
3100
|
function isWeakMap(value) {
|
|
3101
|
-
return
|
|
3101
|
+
return isPromise.isWeakMap(value);
|
|
3102
3102
|
}
|
|
3103
3103
|
|
|
3104
3104
|
function isWeakSet(value) {
|
|
3105
|
-
return
|
|
3105
|
+
return isPromise.isWeakSet(value);
|
|
3106
3106
|
}
|
|
3107
3107
|
|
|
3108
3108
|
function normalizeForCase(str) {
|
|
@@ -3374,7 +3374,7 @@ function cond(pairs) {
|
|
|
3374
3374
|
const processedPairs = pairs.map(pair => {
|
|
3375
3375
|
const predicate = pair[0];
|
|
3376
3376
|
const func = pair[1];
|
|
3377
|
-
if (!
|
|
3377
|
+
if (!isPromise.isFunction(func)) {
|
|
3378
3378
|
throw new TypeError('Expected a function');
|
|
3379
3379
|
}
|
|
3380
3380
|
return [iteratee(predicate), func];
|
|
@@ -3643,22 +3643,22 @@ exports.toCamelCaseKeys = toSnakeCaseKeys.toCamelCaseKeys;
|
|
|
3643
3643
|
exports.toMerged = toSnakeCaseKeys.toMerged;
|
|
3644
3644
|
exports.toSnakeCaseKeys = toSnakeCaseKeys.toSnakeCaseKeys;
|
|
3645
3645
|
exports.isPrimitive = isPlainObject.isPrimitive;
|
|
3646
|
-
exports.eq =
|
|
3647
|
-
exports.isBlob =
|
|
3648
|
-
exports.isBrowser =
|
|
3649
|
-
exports.isEqual =
|
|
3650
|
-
exports.isFile =
|
|
3651
|
-
exports.isFunction =
|
|
3652
|
-
exports.isJSON =
|
|
3653
|
-
exports.isJSONArray =
|
|
3654
|
-
exports.isJSONObject =
|
|
3655
|
-
exports.isJSONValue =
|
|
3656
|
-
exports.isLength =
|
|
3657
|
-
exports.isNode =
|
|
3658
|
-
exports.isNotNil =
|
|
3659
|
-
exports.isNull =
|
|
3660
|
-
exports.isPromise =
|
|
3661
|
-
exports.isUndefined =
|
|
3646
|
+
exports.eq = isPromise.eq;
|
|
3647
|
+
exports.isBlob = isPromise.isBlob;
|
|
3648
|
+
exports.isBrowser = isPromise.isBrowser;
|
|
3649
|
+
exports.isEqual = isPromise.isEqual;
|
|
3650
|
+
exports.isFile = isPromise.isFile;
|
|
3651
|
+
exports.isFunction = isPromise.isFunction;
|
|
3652
|
+
exports.isJSON = isPromise.isJSON;
|
|
3653
|
+
exports.isJSONArray = isPromise.isJSONArray;
|
|
3654
|
+
exports.isJSONObject = isPromise.isJSONObject;
|
|
3655
|
+
exports.isJSONValue = isPromise.isJSONValue;
|
|
3656
|
+
exports.isLength = isPromise.isLength;
|
|
3657
|
+
exports.isNode = isPromise.isNode;
|
|
3658
|
+
exports.isNotNil = isPromise.isNotNil;
|
|
3659
|
+
exports.isNull = isPromise.isNull;
|
|
3660
|
+
exports.isPromise = isPromise.isPromise;
|
|
3661
|
+
exports.isUndefined = isPromise.isUndefined;
|
|
3662
3662
|
exports.Mutex = promise_index.Mutex;
|
|
3663
3663
|
exports.Semaphore = promise_index.Semaphore;
|
|
3664
3664
|
exports.timeout = promise_index.timeout;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const randomInt = require('./_chunk/randomInt-CF7bZK.js');
|
|
|
15
15
|
const math_index = require('./math/index.js');
|
|
16
16
|
const toSnakeCaseKeys = require('./_chunk/toSnakeCaseKeys-BNpS71.js');
|
|
17
17
|
const object_index = require('./object/index.js');
|
|
18
|
-
const
|
|
18
|
+
const isPromise = require('./_chunk/isPromise-ByAybB.js');
|
|
19
19
|
const predicate_index = require('./predicate/index.js');
|
|
20
20
|
const isPlainObject = require('./_chunk/isPlainObject-Xaozpc.js');
|
|
21
21
|
const delay = require('./_chunk/delay-_VMfFa.js');
|
|
@@ -141,32 +141,32 @@ exports.mergeWith = object_index.mergeWith;
|
|
|
141
141
|
exports.omit = object_index.omit;
|
|
142
142
|
exports.pick = object_index.pick;
|
|
143
143
|
exports.pickBy = object_index.pickBy;
|
|
144
|
-
exports.isArrayBuffer =
|
|
145
|
-
exports.isBlob =
|
|
146
|
-
exports.isBrowser =
|
|
147
|
-
exports.isBuffer =
|
|
148
|
-
exports.isDate =
|
|
149
|
-
exports.isEqual =
|
|
150
|
-
exports.isEqualWith =
|
|
151
|
-
exports.isFile =
|
|
152
|
-
exports.isFunction =
|
|
153
|
-
exports.isJSON =
|
|
154
|
-
exports.isJSONArray =
|
|
155
|
-
exports.isJSONObject =
|
|
156
|
-
exports.isJSONValue =
|
|
157
|
-
exports.isLength =
|
|
158
|
-
exports.isMap =
|
|
159
|
-
exports.isNil =
|
|
160
|
-
exports.isNode =
|
|
161
|
-
exports.isNotNil =
|
|
162
|
-
exports.isNull =
|
|
163
|
-
exports.isPromise =
|
|
164
|
-
exports.isRegExp =
|
|
165
|
-
exports.isSet =
|
|
166
|
-
exports.isSymbol =
|
|
167
|
-
exports.isUndefined =
|
|
168
|
-
exports.isWeakMap =
|
|
169
|
-
exports.isWeakSet =
|
|
144
|
+
exports.isArrayBuffer = isPromise.isArrayBuffer;
|
|
145
|
+
exports.isBlob = isPromise.isBlob;
|
|
146
|
+
exports.isBrowser = isPromise.isBrowser;
|
|
147
|
+
exports.isBuffer = isPromise.isBuffer;
|
|
148
|
+
exports.isDate = isPromise.isDate;
|
|
149
|
+
exports.isEqual = isPromise.isEqual;
|
|
150
|
+
exports.isEqualWith = isPromise.isEqualWith;
|
|
151
|
+
exports.isFile = isPromise.isFile;
|
|
152
|
+
exports.isFunction = isPromise.isFunction;
|
|
153
|
+
exports.isJSON = isPromise.isJSON;
|
|
154
|
+
exports.isJSONArray = isPromise.isJSONArray;
|
|
155
|
+
exports.isJSONObject = isPromise.isJSONObject;
|
|
156
|
+
exports.isJSONValue = isPromise.isJSONValue;
|
|
157
|
+
exports.isLength = isPromise.isLength;
|
|
158
|
+
exports.isMap = isPromise.isMap;
|
|
159
|
+
exports.isNil = isPromise.isNil;
|
|
160
|
+
exports.isNode = isPromise.isNode;
|
|
161
|
+
exports.isNotNil = isPromise.isNotNil;
|
|
162
|
+
exports.isNull = isPromise.isNull;
|
|
163
|
+
exports.isPromise = isPromise.isPromise;
|
|
164
|
+
exports.isRegExp = isPromise.isRegExp;
|
|
165
|
+
exports.isSet = isPromise.isSet;
|
|
166
|
+
exports.isSymbol = isPromise.isSymbol;
|
|
167
|
+
exports.isUndefined = isPromise.isUndefined;
|
|
168
|
+
exports.isWeakMap = isPromise.isWeakMap;
|
|
169
|
+
exports.isWeakSet = isPromise.isWeakSet;
|
|
170
170
|
exports.isBoolean = predicate_index.isBoolean;
|
|
171
171
|
exports.isError = predicate_index.isError;
|
|
172
172
|
exports.isString = predicate_index.isString;
|
package/dist/predicate/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const isPromise = require('../_chunk/isPromise-ByAybB.js');
|
|
6
6
|
const isPlainObject = require('../_chunk/isPlainObject-Xaozpc.js');
|
|
7
7
|
|
|
8
8
|
function isBoolean(x) {
|
|
@@ -17,32 +17,32 @@ function isString(value) {
|
|
|
17
17
|
return typeof value === 'string';
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
exports.isArrayBuffer =
|
|
21
|
-
exports.isBlob =
|
|
22
|
-
exports.isBrowser =
|
|
23
|
-
exports.isBuffer =
|
|
24
|
-
exports.isDate =
|
|
25
|
-
exports.isEqual =
|
|
26
|
-
exports.isEqualWith =
|
|
27
|
-
exports.isFile =
|
|
28
|
-
exports.isFunction =
|
|
29
|
-
exports.isJSON =
|
|
30
|
-
exports.isJSONArray =
|
|
31
|
-
exports.isJSONObject =
|
|
32
|
-
exports.isJSONValue =
|
|
33
|
-
exports.isLength =
|
|
34
|
-
exports.isMap =
|
|
35
|
-
exports.isNil =
|
|
36
|
-
exports.isNode =
|
|
37
|
-
exports.isNotNil =
|
|
38
|
-
exports.isNull =
|
|
39
|
-
exports.isPromise =
|
|
40
|
-
exports.isRegExp =
|
|
41
|
-
exports.isSet =
|
|
42
|
-
exports.isSymbol =
|
|
43
|
-
exports.isUndefined =
|
|
44
|
-
exports.isWeakMap =
|
|
45
|
-
exports.isWeakSet =
|
|
20
|
+
exports.isArrayBuffer = isPromise.isArrayBuffer;
|
|
21
|
+
exports.isBlob = isPromise.isBlob;
|
|
22
|
+
exports.isBrowser = isPromise.isBrowser;
|
|
23
|
+
exports.isBuffer = isPromise.isBuffer;
|
|
24
|
+
exports.isDate = isPromise.isDate;
|
|
25
|
+
exports.isEqual = isPromise.isEqual;
|
|
26
|
+
exports.isEqualWith = isPromise.isEqualWith;
|
|
27
|
+
exports.isFile = isPromise.isFile;
|
|
28
|
+
exports.isFunction = isPromise.isFunction;
|
|
29
|
+
exports.isJSON = isPromise.isJSON;
|
|
30
|
+
exports.isJSONArray = isPromise.isJSONArray;
|
|
31
|
+
exports.isJSONObject = isPromise.isJSONObject;
|
|
32
|
+
exports.isJSONValue = isPromise.isJSONValue;
|
|
33
|
+
exports.isLength = isPromise.isLength;
|
|
34
|
+
exports.isMap = isPromise.isMap;
|
|
35
|
+
exports.isNil = isPromise.isNil;
|
|
36
|
+
exports.isNode = isPromise.isNode;
|
|
37
|
+
exports.isNotNil = isPromise.isNotNil;
|
|
38
|
+
exports.isNull = isPromise.isNull;
|
|
39
|
+
exports.isPromise = isPromise.isPromise;
|
|
40
|
+
exports.isRegExp = isPromise.isRegExp;
|
|
41
|
+
exports.isSet = isPromise.isSet;
|
|
42
|
+
exports.isSymbol = isPromise.isSymbol;
|
|
43
|
+
exports.isUndefined = isPromise.isUndefined;
|
|
44
|
+
exports.isWeakMap = isPromise.isWeakMap;
|
|
45
|
+
exports.isWeakSet = isPromise.isWeakSet;
|
|
46
46
|
exports.isPlainObject = isPlainObject.isPlainObject;
|
|
47
47
|
exports.isPrimitive = isPlainObject.isPrimitive;
|
|
48
48
|
exports.isTypedArray = isPlainObject.isTypedArray;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
3
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
4
|
-
"version": "1.35.0-dev.
|
|
4
|
+
"version": "1.35.0-dev.1174+b82b79e5",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|