es-toolkit 1.23.0-dev.734 → 1.23.0-dev.735
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/_chunk/deburr-BPmkoM.js +47 -0
- package/dist/_chunk/{flowRight-B6_Omw.js → flowRight-bRd7s5.js} +0 -48
- package/dist/_chunk/{isWeakSet-BAMm2l.js → isJSONObject-XuEao3.js} +144 -27
- package/dist/_chunk/{pad-BWiShN.js → pad-Bgd7Ah.js} +7 -52
- package/dist/_chunk/partialRight-CRhV1h.js +53 -0
- package/dist/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/compat/array/includes.mjs +2 -1
- package/dist/compat/index.js +46 -157
- package/dist/compat/index.mjs +20 -20
- package/dist/compat/predicate/isMap.mjs +6 -0
- package/dist/compat/predicate/isMatch.mjs +2 -1
- package/dist/function/index.js +5 -5
- package/dist/index.js +27 -26
- package/dist/predicate/index.js +19 -19
- package/dist/predicate/isEqualWith.mjs +8 -1
- package/dist/string/index.js +3 -2
- package/package.json +1 -1
- package/dist/_chunk/noop-2IwLUk.js +0 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isString } from '../predicate/isString.mjs';
|
|
2
|
+
import { eq } from '../util/eq.mjs';
|
|
2
3
|
import { toInteger } from '../util/toInteger.mjs';
|
|
3
4
|
|
|
4
5
|
function includes(source, target, fromIndex, guard) {
|
|
@@ -29,7 +30,7 @@ function includes(source, target, fromIndex, guard) {
|
|
|
29
30
|
}
|
|
30
31
|
for (let i = fromIndex; i < keys.length; i++) {
|
|
31
32
|
const value = Reflect.get(source, keys[i]);
|
|
32
|
-
if (
|
|
33
|
+
if (eq(value, target)) {
|
|
33
34
|
return true;
|
|
34
35
|
}
|
|
35
36
|
}
|
package/dist/compat/index.js
CHANGED
|
@@ -4,14 +4,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const zipWith = require('../_chunk/zipWith-EOU_KZ.js');
|
|
6
6
|
const promise_index = require('../_chunk/index-BGZDR9.js');
|
|
7
|
-
const flowRight$1 = require('../_chunk/flowRight-
|
|
8
|
-
const
|
|
7
|
+
const flowRight$1 = require('../_chunk/flowRight-bRd7s5.js');
|
|
8
|
+
const partialRight = require('../_chunk/partialRight-CRhV1h.js');
|
|
9
9
|
const rangeRight = require('../_chunk/rangeRight-CtcxMd.js');
|
|
10
10
|
const randomInt = require('../_chunk/randomInt-CF7bZK.js');
|
|
11
11
|
const isObjectLike = require('../_chunk/isObjectLike-aywuSF.js');
|
|
12
12
|
const isPlainObject$1 = require('../_chunk/isPlainObject-DgrsU7.js');
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const isJSONObject = require('../_chunk/isJSONObject-XuEao3.js');
|
|
14
|
+
const deburr = require('../_chunk/deburr-BPmkoM.js');
|
|
15
|
+
const pad$1 = require('../_chunk/pad-Bgd7Ah.js');
|
|
15
16
|
|
|
16
17
|
function castArray(value) {
|
|
17
18
|
if (arguments.length === 0) {
|
|
@@ -221,7 +222,7 @@ function isMatch(target, source) {
|
|
|
221
222
|
}
|
|
222
223
|
default: {
|
|
223
224
|
if (!isObject(target)) {
|
|
224
|
-
return
|
|
225
|
+
return isJSONObject.eq(target, source);
|
|
225
226
|
}
|
|
226
227
|
return !source;
|
|
227
228
|
}
|
|
@@ -283,14 +284,14 @@ function cloneDeep(obj) {
|
|
|
283
284
|
return isObjectLike.cloneDeep(obj);
|
|
284
285
|
}
|
|
285
286
|
switch (Object.prototype.toString.call(obj)) {
|
|
286
|
-
case
|
|
287
|
-
case
|
|
288
|
-
case
|
|
287
|
+
case isJSONObject.numberTag:
|
|
288
|
+
case isJSONObject.stringTag:
|
|
289
|
+
case isJSONObject.booleanTag: {
|
|
289
290
|
const result = new obj.constructor(obj?.valueOf());
|
|
290
291
|
isObjectLike.copyProperties(result, obj);
|
|
291
292
|
return result;
|
|
292
293
|
}
|
|
293
|
-
case
|
|
294
|
+
case isJSONObject.argumentsTag: {
|
|
294
295
|
const result = {};
|
|
295
296
|
isObjectLike.copyProperties(result, obj);
|
|
296
297
|
result.length = obj.length;
|
|
@@ -319,7 +320,7 @@ function isIndex(value) {
|
|
|
319
320
|
}
|
|
320
321
|
|
|
321
322
|
function isArguments(value) {
|
|
322
|
-
return value !== null && typeof value === 'object' &&
|
|
323
|
+
return value !== null && typeof value === 'object' && isJSONObject.getTag(value) === '[object Arguments]';
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
function has(object, path) {
|
|
@@ -640,7 +641,7 @@ function includes(source, target, fromIndex, guard) {
|
|
|
640
641
|
}
|
|
641
642
|
for (let i = fromIndex; i < keys.length; i++) {
|
|
642
643
|
const value = Reflect.get(source, keys[i]);
|
|
643
|
-
if (
|
|
644
|
+
if (isJSONObject.eq(value, target)) {
|
|
644
645
|
return true;
|
|
645
646
|
}
|
|
646
647
|
}
|
|
@@ -792,7 +793,7 @@ function sortBy(collection, criteria) {
|
|
|
792
793
|
}
|
|
793
794
|
|
|
794
795
|
function size(target) {
|
|
795
|
-
if (
|
|
796
|
+
if (isJSONObject.isNil(target)) {
|
|
796
797
|
return 0;
|
|
797
798
|
}
|
|
798
799
|
if (target instanceof Map || target instanceof Set) {
|
|
@@ -913,32 +914,6 @@ function ary(func, n = func.length, guard) {
|
|
|
913
914
|
return flowRight$1.ary(func, n);
|
|
914
915
|
}
|
|
915
916
|
|
|
916
|
-
function bind(func, thisObj, ...partialArgs) {
|
|
917
|
-
const bound = function (...providedArgs) {
|
|
918
|
-
const args = [];
|
|
919
|
-
let startIndex = 0;
|
|
920
|
-
for (let i = 0; i < partialArgs.length; i++) {
|
|
921
|
-
const arg = partialArgs[i];
|
|
922
|
-
if (arg === bind.placeholder) {
|
|
923
|
-
args.push(providedArgs[startIndex++]);
|
|
924
|
-
}
|
|
925
|
-
else {
|
|
926
|
-
args.push(arg);
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
for (let i = startIndex; i < providedArgs.length; i++) {
|
|
930
|
-
args.push(providedArgs[i]);
|
|
931
|
-
}
|
|
932
|
-
if (this instanceof bound) {
|
|
933
|
-
return new func(...args);
|
|
934
|
-
}
|
|
935
|
-
return func.apply(thisObj, args);
|
|
936
|
-
};
|
|
937
|
-
return bound;
|
|
938
|
-
}
|
|
939
|
-
const bindPlaceholder = Symbol('bind.placeholder');
|
|
940
|
-
bind.placeholder = bindPlaceholder;
|
|
941
|
-
|
|
942
917
|
function before(n, func) {
|
|
943
918
|
if (typeof func !== 'function') {
|
|
944
919
|
throw new TypeError('Expected a function');
|
|
@@ -956,32 +931,6 @@ function before(n, func) {
|
|
|
956
931
|
};
|
|
957
932
|
}
|
|
958
933
|
|
|
959
|
-
function bindKey(object, key, ...partialArgs) {
|
|
960
|
-
const bound = function (...providedArgs) {
|
|
961
|
-
const args = [];
|
|
962
|
-
let startIndex = 0;
|
|
963
|
-
for (let i = 0; i < partialArgs.length; i++) {
|
|
964
|
-
const arg = partialArgs[i];
|
|
965
|
-
if (arg === bindKey.placeholder) {
|
|
966
|
-
args.push(providedArgs[startIndex++]);
|
|
967
|
-
}
|
|
968
|
-
else {
|
|
969
|
-
args.push(arg);
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
for (let i = startIndex; i < providedArgs.length; i++) {
|
|
973
|
-
args.push(providedArgs[i]);
|
|
974
|
-
}
|
|
975
|
-
if (this instanceof bound) {
|
|
976
|
-
return new object[key](...args);
|
|
977
|
-
}
|
|
978
|
-
return object[key].apply(object, args);
|
|
979
|
-
};
|
|
980
|
-
return bound;
|
|
981
|
-
}
|
|
982
|
-
const bindKeyPlaceholder = Symbol('bindKey.placeholder');
|
|
983
|
-
bindKey.placeholder = bindKeyPlaceholder;
|
|
984
|
-
|
|
985
934
|
function defer(func, ...args) {
|
|
986
935
|
if (typeof func !== 'function') {
|
|
987
936
|
throw new TypeError('Expected a function');
|
|
@@ -1032,62 +981,6 @@ function rearg(func, ...indices) {
|
|
|
1032
981
|
};
|
|
1033
982
|
}
|
|
1034
983
|
|
|
1035
|
-
function curry(func, arity = func.length, guard) {
|
|
1036
|
-
arity = guard ? func.length : arity;
|
|
1037
|
-
arity = Number.parseInt(arity, 10);
|
|
1038
|
-
if (Number.isNaN(arity) || arity < 1) {
|
|
1039
|
-
arity = 0;
|
|
1040
|
-
}
|
|
1041
|
-
const wrapper = function (...partialArgs) {
|
|
1042
|
-
const holders = partialArgs.filter(item => item === curry.placeholder);
|
|
1043
|
-
const length = partialArgs.length - holders.length;
|
|
1044
|
-
if (length < arity) {
|
|
1045
|
-
return makeCurry(func, arity - length, partialArgs);
|
|
1046
|
-
}
|
|
1047
|
-
if (this instanceof wrapper) {
|
|
1048
|
-
return new func(...partialArgs);
|
|
1049
|
-
}
|
|
1050
|
-
return func.apply(this, partialArgs);
|
|
1051
|
-
};
|
|
1052
|
-
wrapper.placeholder = curryPlaceholder;
|
|
1053
|
-
return wrapper;
|
|
1054
|
-
}
|
|
1055
|
-
function makeCurry(func, arity, partialArgs) {
|
|
1056
|
-
function wrapper(...providedArgs) {
|
|
1057
|
-
const holders = providedArgs.filter(item => item === curry.placeholder);
|
|
1058
|
-
const length = providedArgs.length - holders.length;
|
|
1059
|
-
providedArgs = composeArgs(providedArgs, partialArgs);
|
|
1060
|
-
if (length < arity) {
|
|
1061
|
-
return makeCurry(func, arity - length, providedArgs);
|
|
1062
|
-
}
|
|
1063
|
-
if (this instanceof wrapper) {
|
|
1064
|
-
return new func(...providedArgs);
|
|
1065
|
-
}
|
|
1066
|
-
return func.apply(this, providedArgs);
|
|
1067
|
-
}
|
|
1068
|
-
wrapper.placeholder = curryPlaceholder;
|
|
1069
|
-
return wrapper;
|
|
1070
|
-
}
|
|
1071
|
-
function composeArgs(providedArgs, partialArgs) {
|
|
1072
|
-
const args = [];
|
|
1073
|
-
let startIndex = 0;
|
|
1074
|
-
for (let i = 0; i < partialArgs.length; i++) {
|
|
1075
|
-
const arg = partialArgs[i];
|
|
1076
|
-
if (arg === curry.placeholder && startIndex < providedArgs.length) {
|
|
1077
|
-
args.push(providedArgs[startIndex++]);
|
|
1078
|
-
}
|
|
1079
|
-
else {
|
|
1080
|
-
args.push(arg);
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
for (let i = startIndex; i < providedArgs.length; i++) {
|
|
1084
|
-
args.push(providedArgs[i]);
|
|
1085
|
-
}
|
|
1086
|
-
return args;
|
|
1087
|
-
}
|
|
1088
|
-
const curryPlaceholder = Symbol('curry.placeholder');
|
|
1089
|
-
curry.placeholder = curryPlaceholder;
|
|
1090
|
-
|
|
1091
984
|
function debounce(func, debounceMs = 0, options = {}) {
|
|
1092
985
|
if (typeof options !== 'object') {
|
|
1093
986
|
options = {};
|
|
@@ -1378,7 +1271,7 @@ function mergeWithDeep(target, source, merge, stack) {
|
|
|
1378
1271
|
source[i] = source[i] ?? undefined;
|
|
1379
1272
|
}
|
|
1380
1273
|
}
|
|
1381
|
-
const sourceKeys = [...Object.keys(source), ...
|
|
1274
|
+
const sourceKeys = [...Object.keys(source), ...isJSONObject.getSymbols(source)];
|
|
1382
1275
|
for (let i = 0; i < sourceKeys.length; i++) {
|
|
1383
1276
|
const key = sourceKeys[i];
|
|
1384
1277
|
let sourceValue = source[key];
|
|
@@ -1430,11 +1323,11 @@ function mergeWithDeep(target, source, merge, stack) {
|
|
|
1430
1323
|
}
|
|
1431
1324
|
|
|
1432
1325
|
function merge(object, ...sources) {
|
|
1433
|
-
return mergeWith(object, ...sources,
|
|
1326
|
+
return mergeWith(object, ...sources, partialRight.noop);
|
|
1434
1327
|
}
|
|
1435
1328
|
|
|
1436
1329
|
function isArrayLike(value) {
|
|
1437
|
-
return value != null && typeof value !== 'function' &&
|
|
1330
|
+
return value != null && typeof value !== 'function' && isJSONObject.isLength(value.length);
|
|
1438
1331
|
}
|
|
1439
1332
|
|
|
1440
1333
|
function fromPairs(pairs) {
|
|
@@ -1450,7 +1343,7 @@ function fromPairs(pairs) {
|
|
|
1450
1343
|
|
|
1451
1344
|
function invertBy(object, iteratee) {
|
|
1452
1345
|
const result = {};
|
|
1453
|
-
if (
|
|
1346
|
+
if (isJSONObject.isNil(object)) {
|
|
1454
1347
|
return result;
|
|
1455
1348
|
}
|
|
1456
1349
|
if (iteratee == null) {
|
|
@@ -1471,10 +1364,6 @@ function invertBy(object, iteratee) {
|
|
|
1471
1364
|
return result;
|
|
1472
1365
|
}
|
|
1473
1366
|
|
|
1474
|
-
function eq(value, other) {
|
|
1475
|
-
return value === other || (Number.isNaN(value) && Number.isNaN(other));
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
1367
|
function defaults(object, ...sources) {
|
|
1479
1368
|
object = Object(object);
|
|
1480
1369
|
const objectProto = Object.prototype;
|
|
@@ -1485,7 +1374,7 @@ function defaults(object, ...sources) {
|
|
|
1485
1374
|
const key = keys[j];
|
|
1486
1375
|
const value = object[key];
|
|
1487
1376
|
if (value === undefined ||
|
|
1488
|
-
(!Object.hasOwn(object, key) && eq(value, objectProto[key]))) {
|
|
1377
|
+
(!Object.hasOwn(object, key) && isJSONObject.eq(value, objectProto[key]))) {
|
|
1489
1378
|
object[key] = source[key];
|
|
1490
1379
|
}
|
|
1491
1380
|
}
|
|
@@ -1499,7 +1388,7 @@ function toDefaulted(object, ...sources) {
|
|
|
1499
1388
|
}
|
|
1500
1389
|
|
|
1501
1390
|
function isArrayBuffer(value) {
|
|
1502
|
-
return
|
|
1391
|
+
return isJSONObject.isArrayBuffer(value);
|
|
1503
1392
|
}
|
|
1504
1393
|
|
|
1505
1394
|
function isBoolean(value) {
|
|
@@ -1507,7 +1396,7 @@ function isBoolean(value) {
|
|
|
1507
1396
|
}
|
|
1508
1397
|
|
|
1509
1398
|
function isError(value) {
|
|
1510
|
-
return
|
|
1399
|
+
return isJSONObject.getTag(value) === '[object Error]';
|
|
1511
1400
|
}
|
|
1512
1401
|
|
|
1513
1402
|
function isFinite(value) {
|
|
@@ -1515,23 +1404,23 @@ function isFinite(value) {
|
|
|
1515
1404
|
}
|
|
1516
1405
|
|
|
1517
1406
|
function isMap(value) {
|
|
1518
|
-
return
|
|
1407
|
+
return isJSONObject.isMap(value);
|
|
1519
1408
|
}
|
|
1520
1409
|
|
|
1521
1410
|
function isSet(value) {
|
|
1522
|
-
return
|
|
1411
|
+
return isJSONObject.isSet(value);
|
|
1523
1412
|
}
|
|
1524
1413
|
|
|
1525
1414
|
function isRegExp(value) {
|
|
1526
|
-
return
|
|
1415
|
+
return isJSONObject.isRegExp(value);
|
|
1527
1416
|
}
|
|
1528
1417
|
|
|
1529
1418
|
function isWeakMap(value) {
|
|
1530
|
-
return
|
|
1419
|
+
return isJSONObject.isWeakMap(value);
|
|
1531
1420
|
}
|
|
1532
1421
|
|
|
1533
1422
|
function isWeakSet(value) {
|
|
1534
|
-
return
|
|
1423
|
+
return isJSONObject.isWeakSet(value);
|
|
1535
1424
|
}
|
|
1536
1425
|
|
|
1537
1426
|
function conformsTo(target, source) {
|
|
@@ -1580,11 +1469,11 @@ function isArrayLikeObject(value) {
|
|
|
1580
1469
|
return isObjectLike.isObjectLike(value) && isArrayLike(value);
|
|
1581
1470
|
}
|
|
1582
1471
|
|
|
1583
|
-
function isEqualWith(a, b, areValuesEqual =
|
|
1472
|
+
function isEqualWith(a, b, areValuesEqual = partialRight.noop) {
|
|
1584
1473
|
if (typeof areValuesEqual !== 'function') {
|
|
1585
|
-
areValuesEqual =
|
|
1474
|
+
areValuesEqual = partialRight.noop;
|
|
1586
1475
|
}
|
|
1587
|
-
return
|
|
1476
|
+
return isJSONObject.isEqualWith(a, b, (...args) => {
|
|
1588
1477
|
const result = areValuesEqual(...args);
|
|
1589
1478
|
if (result !== undefined) {
|
|
1590
1479
|
return !!result;
|
|
@@ -1967,10 +1856,10 @@ exports.curryRight = flowRight$1.curryRight;
|
|
|
1967
1856
|
exports.memoize = flowRight$1.memoize;
|
|
1968
1857
|
exports.negate = flowRight$1.negate;
|
|
1969
1858
|
exports.once = flowRight$1.once;
|
|
1970
|
-
exports.partial = flowRight$1.partial;
|
|
1971
|
-
exports.partialRight = flowRight$1.partialRight;
|
|
1972
1859
|
exports.unary = flowRight$1.unary;
|
|
1973
|
-
exports.noop =
|
|
1860
|
+
exports.noop = partialRight.noop;
|
|
1861
|
+
exports.partial = partialRight.partial;
|
|
1862
|
+
exports.partialRight = partialRight.partialRight;
|
|
1974
1863
|
exports.mean = rangeRight.mean;
|
|
1975
1864
|
exports.meanBy = rangeRight.meanBy;
|
|
1976
1865
|
exports.range = rangeRight.range;
|
|
@@ -1986,19 +1875,23 @@ exports.omitBy = isObjectLike.omitBy;
|
|
|
1986
1875
|
exports.pickBy = isObjectLike.pickBy;
|
|
1987
1876
|
exports.toMerged = isObjectLike.toMerged;
|
|
1988
1877
|
exports.isPrimitive = isPlainObject$1.isPrimitive;
|
|
1989
|
-
exports.
|
|
1990
|
-
exports.
|
|
1991
|
-
exports.
|
|
1992
|
-
exports.
|
|
1993
|
-
exports.
|
|
1994
|
-
exports.
|
|
1995
|
-
exports.
|
|
1996
|
-
exports.
|
|
1997
|
-
exports.
|
|
1998
|
-
exports.
|
|
1878
|
+
exports.bind = isJSONObject.bind;
|
|
1879
|
+
exports.bindKey = isJSONObject.bindKey;
|
|
1880
|
+
exports.curry = isJSONObject.curry;
|
|
1881
|
+
exports.eq = isJSONObject.eq;
|
|
1882
|
+
exports.isDate = isJSONObject.isDate;
|
|
1883
|
+
exports.isEqual = isJSONObject.isEqual;
|
|
1884
|
+
exports.isFunction = isJSONObject.isFunction;
|
|
1885
|
+
exports.isJSONArray = isJSONObject.isJSONArray;
|
|
1886
|
+
exports.isJSONObject = isJSONObject.isJSONObject;
|
|
1887
|
+
exports.isJSONValue = isJSONObject.isJSONValue;
|
|
1888
|
+
exports.isLength = isJSONObject.isLength;
|
|
1889
|
+
exports.isNotNil = isJSONObject.isNotNil;
|
|
1890
|
+
exports.isNull = isJSONObject.isNull;
|
|
1891
|
+
exports.isUndefined = isJSONObject.isUndefined;
|
|
1892
|
+
exports.deburr = deburr.deburr;
|
|
1999
1893
|
exports.capitalize = pad$1.capitalize;
|
|
2000
1894
|
exports.constantCase = pad$1.constantCase;
|
|
2001
|
-
exports.deburr = pad$1.deburr;
|
|
2002
1895
|
exports.escape = pad$1.escape;
|
|
2003
1896
|
exports.escapeRegExp = pad$1.escapeRegExp;
|
|
2004
1897
|
exports.lowerFirst = pad$1.lowerFirst;
|
|
@@ -2008,8 +1901,6 @@ exports.upperFirst = pad$1.upperFirst;
|
|
|
2008
1901
|
exports.ary = ary;
|
|
2009
1902
|
exports.attempt = attempt;
|
|
2010
1903
|
exports.before = before;
|
|
2011
|
-
exports.bind = bind;
|
|
2012
|
-
exports.bindKey = bindKey;
|
|
2013
1904
|
exports.camelCase = camelCase;
|
|
2014
1905
|
exports.castArray = castArray;
|
|
2015
1906
|
exports.ceil = ceil;
|
|
@@ -2019,7 +1910,6 @@ exports.cloneDeep = cloneDeep;
|
|
|
2019
1910
|
exports.concat = concat;
|
|
2020
1911
|
exports.conforms = conforms;
|
|
2021
1912
|
exports.conformsTo = conformsTo;
|
|
2022
|
-
exports.curry = curry;
|
|
2023
1913
|
exports.debounce = debounce;
|
|
2024
1914
|
exports.defaults = defaults;
|
|
2025
1915
|
exports.defer = defer;
|
|
@@ -2027,7 +1917,6 @@ exports.difference = difference;
|
|
|
2027
1917
|
exports.drop = drop;
|
|
2028
1918
|
exports.dropWhile = dropWhile;
|
|
2029
1919
|
exports.endsWith = endsWith;
|
|
2030
|
-
exports.eq = eq;
|
|
2031
1920
|
exports.every = every;
|
|
2032
1921
|
exports.fill = fill;
|
|
2033
1922
|
exports.filter = filter;
|
package/dist/compat/index.mjs
CHANGED
|
@@ -72,26 +72,6 @@ export { toMerged } from '../object/toMerged.mjs';
|
|
|
72
72
|
export { isObjectLike } from './predicate/isObjectLike.mjs';
|
|
73
73
|
export { isDate } from '../predicate/isDate.mjs';
|
|
74
74
|
export { isEqual } from '../predicate/isEqual.mjs';
|
|
75
|
-
export { isNotNil } from '../predicate/isNotNil.mjs';
|
|
76
|
-
export { isNull } from '../predicate/isNull.mjs';
|
|
77
|
-
export { isUndefined } from '../predicate/isUndefined.mjs';
|
|
78
|
-
export { isLength } from '../predicate/isLength.mjs';
|
|
79
|
-
export { isFunction } from '../predicate/isFunction.mjs';
|
|
80
|
-
export { isJSONObject } from '../predicate/isJSONObject.mjs';
|
|
81
|
-
export { isJSONValue } from '../predicate/isJSONValue.mjs';
|
|
82
|
-
export { isJSONArray } from '../predicate/isJSONArray.mjs';
|
|
83
|
-
export { delay } from '../promise/delay.mjs';
|
|
84
|
-
export { withTimeout } from '../promise/withTimeout.mjs';
|
|
85
|
-
export { timeout } from '../promise/timeout.mjs';
|
|
86
|
-
export { capitalize } from '../string/capitalize.mjs';
|
|
87
|
-
export { pascalCase } from '../string/pascalCase.mjs';
|
|
88
|
-
export { constantCase } from '../string/constantCase.mjs';
|
|
89
|
-
export { upperFirst } from '../string/upperFirst.mjs';
|
|
90
|
-
export { lowerFirst } from '../string/lowerFirst.mjs';
|
|
91
|
-
export { deburr } from '../string/deburr.mjs';
|
|
92
|
-
export { escape } from '../string/escape.mjs';
|
|
93
|
-
export { escapeRegExp } from '../string/escapeRegExp.mjs';
|
|
94
|
-
export { unescape } from '../string/unescape.mjs';
|
|
95
75
|
export { castArray } from './array/castArray.mjs';
|
|
96
76
|
export { chunk } from './array/chunk.mjs';
|
|
97
77
|
export { concat } from './array/concat.mjs';
|
|
@@ -206,3 +186,23 @@ export { toNumber } from './util/toNumber.mjs';
|
|
|
206
186
|
export { toInteger } from './util/toInteger.mjs';
|
|
207
187
|
export { toFinite } from './util/toFinite.mjs';
|
|
208
188
|
export { eq } from './util/eq.mjs';
|
|
189
|
+
export { isNotNil } from '../predicate/isNotNil.mjs';
|
|
190
|
+
export { isNull } from '../predicate/isNull.mjs';
|
|
191
|
+
export { isUndefined } from '../predicate/isUndefined.mjs';
|
|
192
|
+
export { isLength } from '../predicate/isLength.mjs';
|
|
193
|
+
export { isFunction } from '../predicate/isFunction.mjs';
|
|
194
|
+
export { isJSONObject } from '../predicate/isJSONObject.mjs';
|
|
195
|
+
export { isJSONValue } from '../predicate/isJSONValue.mjs';
|
|
196
|
+
export { isJSONArray } from '../predicate/isJSONArray.mjs';
|
|
197
|
+
export { delay } from '../promise/delay.mjs';
|
|
198
|
+
export { withTimeout } from '../promise/withTimeout.mjs';
|
|
199
|
+
export { timeout } from '../promise/timeout.mjs';
|
|
200
|
+
export { capitalize } from '../string/capitalize.mjs';
|
|
201
|
+
export { pascalCase } from '../string/pascalCase.mjs';
|
|
202
|
+
export { constantCase } from '../string/constantCase.mjs';
|
|
203
|
+
export { upperFirst } from '../string/upperFirst.mjs';
|
|
204
|
+
export { lowerFirst } from '../string/lowerFirst.mjs';
|
|
205
|
+
export { deburr } from '../string/deburr.mjs';
|
|
206
|
+
export { escape } from '../string/escape.mjs';
|
|
207
|
+
export { escapeRegExp } from '../string/escapeRegExp.mjs';
|
|
208
|
+
export { unescape } from '../string/unescape.mjs';
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import '../../function/partial.mjs';
|
|
2
|
+
import '../../function/partialRight.mjs';
|
|
3
|
+
import '../../string/deburr.mjs';
|
|
4
|
+
import '../function/bind.mjs';
|
|
5
|
+
import '../function/bindKey.mjs';
|
|
6
|
+
import '../function/curry.mjs';
|
|
1
7
|
import { isMap as isMap$1 } from '../../predicate/isMap.mjs';
|
|
2
8
|
|
|
3
9
|
function isMap(value) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isObject } from './isObject.mjs';
|
|
2
2
|
import { isPrimitive } from '../../predicate/isPrimitive.mjs';
|
|
3
|
+
import { eq } from '../util/eq.mjs';
|
|
3
4
|
|
|
4
5
|
function isMatch(target, source) {
|
|
5
6
|
if (source === target) {
|
|
@@ -48,7 +49,7 @@ function isMatch(target, source) {
|
|
|
48
49
|
}
|
|
49
50
|
default: {
|
|
50
51
|
if (!isObject(target)) {
|
|
51
|
-
return
|
|
52
|
+
return eq(target, source);
|
|
52
53
|
}
|
|
53
54
|
return !source;
|
|
54
55
|
}
|
package/dist/function/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const flowRight = require('../_chunk/flowRight-
|
|
6
|
-
const
|
|
5
|
+
const flowRight = require('../_chunk/flowRight-bRd7s5.js');
|
|
6
|
+
const partialRight = require('../_chunk/partialRight-CRhV1h.js');
|
|
7
7
|
|
|
8
8
|
function before(n, func) {
|
|
9
9
|
if (!Number.isInteger(n) || n < 0) {
|
|
@@ -74,11 +74,11 @@ exports.flowRight = flowRight.flowRight;
|
|
|
74
74
|
exports.memoize = flowRight.memoize;
|
|
75
75
|
exports.negate = flowRight.negate;
|
|
76
76
|
exports.once = flowRight.once;
|
|
77
|
-
exports.partial = flowRight.partial;
|
|
78
|
-
exports.partialRight = flowRight.partialRight;
|
|
79
77
|
exports.rest = flowRight.rest;
|
|
80
78
|
exports.unary = flowRight.unary;
|
|
81
|
-
exports.noop =
|
|
79
|
+
exports.noop = partialRight.noop;
|
|
80
|
+
exports.partial = partialRight.partial;
|
|
81
|
+
exports.partialRight = partialRight.partialRight;
|
|
82
82
|
exports.before = before;
|
|
83
83
|
exports.curry = curry;
|
|
84
84
|
exports.spread = spread;
|
package/dist/index.js
CHANGED
|
@@ -6,18 +6,19 @@ const zipWith = require('./_chunk/zipWith-EOU_KZ.js');
|
|
|
6
6
|
const array_index = require('./array/index.js');
|
|
7
7
|
const promise_index = require('./_chunk/index-BGZDR9.js');
|
|
8
8
|
const function_index = require('./function/index.js');
|
|
9
|
-
const flowRight = require('./_chunk/flowRight-
|
|
10
|
-
const
|
|
9
|
+
const flowRight = require('./_chunk/flowRight-bRd7s5.js');
|
|
10
|
+
const partialRight = require('./_chunk/partialRight-CRhV1h.js');
|
|
11
11
|
const rangeRight = require('./_chunk/rangeRight-CtcxMd.js');
|
|
12
12
|
const randomInt = require('./_chunk/randomInt-CF7bZK.js');
|
|
13
13
|
const math_index = require('./math/index.js');
|
|
14
14
|
const object_index = require('./object/index.js');
|
|
15
15
|
const isObjectLike = require('./_chunk/isObjectLike-aywuSF.js');
|
|
16
|
-
const
|
|
16
|
+
const isJSONObject = require('./_chunk/isJSONObject-XuEao3.js');
|
|
17
17
|
const predicate_index = require('./predicate/index.js');
|
|
18
18
|
const isPlainObject = require('./_chunk/isPlainObject-DgrsU7.js');
|
|
19
|
-
const pad = require('./_chunk/pad-
|
|
19
|
+
const pad = require('./_chunk/pad-Bgd7Ah.js');
|
|
20
20
|
const string_index = require('./string/index.js');
|
|
21
|
+
const deburr = require('./_chunk/deburr-BPmkoM.js');
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
|
|
@@ -95,11 +96,11 @@ exports.flowRight = flowRight.flowRight;
|
|
|
95
96
|
exports.memoize = flowRight.memoize;
|
|
96
97
|
exports.negate = flowRight.negate;
|
|
97
98
|
exports.once = flowRight.once;
|
|
98
|
-
exports.partial = flowRight.partial;
|
|
99
|
-
exports.partialRight = flowRight.partialRight;
|
|
100
99
|
exports.rest = flowRight.rest;
|
|
101
100
|
exports.unary = flowRight.unary;
|
|
102
|
-
exports.noop =
|
|
101
|
+
exports.noop = partialRight.noop;
|
|
102
|
+
exports.partial = partialRight.partial;
|
|
103
|
+
exports.partialRight = partialRight.partialRight;
|
|
103
104
|
exports.clamp = rangeRight.clamp;
|
|
104
105
|
exports.inRange = rangeRight.inRange;
|
|
105
106
|
exports.mean = rangeRight.mean;
|
|
@@ -124,24 +125,24 @@ exports.merge = isObjectLike.merge;
|
|
|
124
125
|
exports.omitBy = isObjectLike.omitBy;
|
|
125
126
|
exports.pickBy = isObjectLike.pickBy;
|
|
126
127
|
exports.toMerged = isObjectLike.toMerged;
|
|
127
|
-
exports.isArrayBuffer =
|
|
128
|
-
exports.isDate =
|
|
129
|
-
exports.isEqual =
|
|
130
|
-
exports.isEqualWith =
|
|
131
|
-
exports.isFunction =
|
|
132
|
-
exports.isJSONArray =
|
|
133
|
-
exports.isJSONObject =
|
|
134
|
-
exports.isJSONValue =
|
|
135
|
-
exports.isLength =
|
|
136
|
-
exports.isMap =
|
|
137
|
-
exports.isNil =
|
|
138
|
-
exports.isNotNil =
|
|
139
|
-
exports.isNull =
|
|
140
|
-
exports.isRegExp =
|
|
141
|
-
exports.isSet =
|
|
142
|
-
exports.isUndefined =
|
|
143
|
-
exports.isWeakMap =
|
|
144
|
-
exports.isWeakSet =
|
|
128
|
+
exports.isArrayBuffer = isJSONObject.isArrayBuffer;
|
|
129
|
+
exports.isDate = isJSONObject.isDate;
|
|
130
|
+
exports.isEqual = isJSONObject.isEqual;
|
|
131
|
+
exports.isEqualWith = isJSONObject.isEqualWith;
|
|
132
|
+
exports.isFunction = isJSONObject.isFunction;
|
|
133
|
+
exports.isJSONArray = isJSONObject.isJSONArray;
|
|
134
|
+
exports.isJSONObject = isJSONObject.isJSONObject;
|
|
135
|
+
exports.isJSONValue = isJSONObject.isJSONValue;
|
|
136
|
+
exports.isLength = isJSONObject.isLength;
|
|
137
|
+
exports.isMap = isJSONObject.isMap;
|
|
138
|
+
exports.isNil = isJSONObject.isNil;
|
|
139
|
+
exports.isNotNil = isJSONObject.isNotNil;
|
|
140
|
+
exports.isNull = isJSONObject.isNull;
|
|
141
|
+
exports.isRegExp = isJSONObject.isRegExp;
|
|
142
|
+
exports.isSet = isJSONObject.isSet;
|
|
143
|
+
exports.isUndefined = isJSONObject.isUndefined;
|
|
144
|
+
exports.isWeakMap = isJSONObject.isWeakMap;
|
|
145
|
+
exports.isWeakSet = isJSONObject.isWeakSet;
|
|
145
146
|
exports.isBoolean = predicate_index.isBoolean;
|
|
146
147
|
exports.isError = predicate_index.isError;
|
|
147
148
|
exports.isString = predicate_index.isString;
|
|
@@ -152,7 +153,6 @@ exports.isTypedArray = isPlainObject.isTypedArray;
|
|
|
152
153
|
exports.camelCase = pad.camelCase;
|
|
153
154
|
exports.capitalize = pad.capitalize;
|
|
154
155
|
exports.constantCase = pad.constantCase;
|
|
155
|
-
exports.deburr = pad.deburr;
|
|
156
156
|
exports.escape = pad.escape;
|
|
157
157
|
exports.escapeRegExp = pad.escapeRegExp;
|
|
158
158
|
exports.kebabCase = pad.kebabCase;
|
|
@@ -168,3 +168,4 @@ exports.unescape = pad.unescape;
|
|
|
168
168
|
exports.upperCase = pad.upperCase;
|
|
169
169
|
exports.upperFirst = pad.upperFirst;
|
|
170
170
|
exports.startCase = string_index.startCase;
|
|
171
|
+
exports.deburr = deburr.deburr;
|
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 isJSONObject = require('../_chunk/isJSONObject-XuEao3.js');
|
|
6
6
|
const isPlainObject = require('../_chunk/isPlainObject-DgrsU7.js');
|
|
7
7
|
|
|
8
8
|
function isError(value) {
|
|
@@ -21,24 +21,24 @@ function isString(value) {
|
|
|
21
21
|
return typeof value === 'string';
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
exports.isArrayBuffer =
|
|
25
|
-
exports.isDate =
|
|
26
|
-
exports.isEqual =
|
|
27
|
-
exports.isEqualWith =
|
|
28
|
-
exports.isFunction =
|
|
29
|
-
exports.isJSONArray =
|
|
30
|
-
exports.isJSONObject =
|
|
31
|
-
exports.isJSONValue =
|
|
32
|
-
exports.isLength =
|
|
33
|
-
exports.isMap =
|
|
34
|
-
exports.isNil =
|
|
35
|
-
exports.isNotNil =
|
|
36
|
-
exports.isNull =
|
|
37
|
-
exports.isRegExp =
|
|
38
|
-
exports.isSet =
|
|
39
|
-
exports.isUndefined =
|
|
40
|
-
exports.isWeakMap =
|
|
41
|
-
exports.isWeakSet =
|
|
24
|
+
exports.isArrayBuffer = isJSONObject.isArrayBuffer;
|
|
25
|
+
exports.isDate = isJSONObject.isDate;
|
|
26
|
+
exports.isEqual = isJSONObject.isEqual;
|
|
27
|
+
exports.isEqualWith = isJSONObject.isEqualWith;
|
|
28
|
+
exports.isFunction = isJSONObject.isFunction;
|
|
29
|
+
exports.isJSONArray = isJSONObject.isJSONArray;
|
|
30
|
+
exports.isJSONObject = isJSONObject.isJSONObject;
|
|
31
|
+
exports.isJSONValue = isJSONObject.isJSONValue;
|
|
32
|
+
exports.isLength = isJSONObject.isLength;
|
|
33
|
+
exports.isMap = isJSONObject.isMap;
|
|
34
|
+
exports.isNil = isJSONObject.isNil;
|
|
35
|
+
exports.isNotNil = isJSONObject.isNotNil;
|
|
36
|
+
exports.isNull = isJSONObject.isNull;
|
|
37
|
+
exports.isRegExp = isJSONObject.isRegExp;
|
|
38
|
+
exports.isSet = isJSONObject.isSet;
|
|
39
|
+
exports.isUndefined = isJSONObject.isUndefined;
|
|
40
|
+
exports.isWeakMap = isJSONObject.isWeakMap;
|
|
41
|
+
exports.isWeakSet = isJSONObject.isWeakSet;
|
|
42
42
|
exports.isPlainObject = isPlainObject.isPlainObject;
|
|
43
43
|
exports.isPrimitive = isPlainObject.isPrimitive;
|
|
44
44
|
exports.isTypedArray = isPlainObject.isTypedArray;
|
|
@@ -2,6 +2,13 @@ import { isPlainObject } from './isPlainObject.mjs';
|
|
|
2
2
|
import { getSymbols } from '../compat/_internal/getSymbols.mjs';
|
|
3
3
|
import { getTag } from '../compat/_internal/getTag.mjs';
|
|
4
4
|
import { functionTag, regexpTag, symbolTag, dateTag, booleanTag, numberTag, stringTag, objectTag, errorTag, dataViewTag, arrayBufferTag, float64ArrayTag, float32ArrayTag, bigInt64ArrayTag, int32ArrayTag, int16ArrayTag, int8ArrayTag, bigUint64ArrayTag, uint32ArrayTag, uint16ArrayTag, uint8ClampedArrayTag, uint8ArrayTag, arrayTag, setTag, mapTag, argumentsTag } from '../compat/_internal/tags.mjs';
|
|
5
|
+
import '../function/partial.mjs';
|
|
6
|
+
import '../function/partialRight.mjs';
|
|
7
|
+
import '../string/deburr.mjs';
|
|
8
|
+
import { eq } from '../compat/util/eq.mjs';
|
|
9
|
+
import '../compat/function/bind.mjs';
|
|
10
|
+
import '../compat/function/bindKey.mjs';
|
|
11
|
+
import '../compat/function/curry.mjs';
|
|
5
12
|
|
|
6
13
|
function isEqualWith(a, b, areValuesEqual) {
|
|
7
14
|
return isEqualWithImpl(a, b, undefined, undefined, undefined, undefined, areValuesEqual);
|
|
@@ -54,7 +61,7 @@ function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
|
54
61
|
case numberTag: {
|
|
55
62
|
const x = a.valueOf();
|
|
56
63
|
const y = b.valueOf();
|
|
57
|
-
return
|
|
64
|
+
return eq(x, y);
|
|
58
65
|
}
|
|
59
66
|
case booleanTag:
|
|
60
67
|
case dateTag:
|