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
|
@@ -11,25 +11,34 @@ function eq(value, other) {
|
|
|
11
11
|
return value === other || (Number.isNaN(value) && Number.isNaN(other));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function isNil(x) {
|
|
15
|
+
return x == null;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return x instanceof Blob;
|
|
18
|
+
function isNull(x) {
|
|
19
|
+
return x === null;
|
|
23
20
|
}
|
|
24
21
|
|
|
25
|
-
function
|
|
26
|
-
return
|
|
22
|
+
function isUndefined(x) {
|
|
23
|
+
return x === undefined;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function isSymbol(value) {
|
|
27
|
+
return typeof value === 'symbol';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function isFunction(value) {
|
|
31
|
+
return typeof value === 'function';
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
function isBuffer(x) {
|
|
30
35
|
return typeof Buffer !== 'undefined' && Buffer.isBuffer(x);
|
|
31
36
|
}
|
|
32
37
|
|
|
38
|
+
function isArrayBuffer(value) {
|
|
39
|
+
return value instanceof ArrayBuffer;
|
|
40
|
+
}
|
|
41
|
+
|
|
33
42
|
function isDate(value) {
|
|
34
43
|
return value instanceof Date;
|
|
35
44
|
}
|
|
@@ -212,6 +221,37 @@ function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
|
212
221
|
}
|
|
213
222
|
}
|
|
214
223
|
|
|
224
|
+
function isMap(value) {
|
|
225
|
+
return value instanceof Map;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function isRegExp(value) {
|
|
229
|
+
return value instanceof RegExp;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function isSet(value) {
|
|
233
|
+
return value instanceof Set;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function isWeakMap(value) {
|
|
237
|
+
return value instanceof WeakMap;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function isWeakSet(value) {
|
|
241
|
+
return value instanceof WeakSet;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function isBlob(x) {
|
|
245
|
+
if (typeof Blob === 'undefined') {
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
return x instanceof Blob;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function isBrowser() {
|
|
252
|
+
return typeof window !== 'undefined' && window?.document != null;
|
|
253
|
+
}
|
|
254
|
+
|
|
215
255
|
function isEqual(a, b) {
|
|
216
256
|
return isEqualWith(a, b, noop.noop);
|
|
217
257
|
}
|
|
@@ -223,10 +263,6 @@ function isFile(x) {
|
|
|
223
263
|
return isBlob(x) && x instanceof File;
|
|
224
264
|
}
|
|
225
265
|
|
|
226
|
-
function isFunction(value) {
|
|
227
|
-
return typeof value === 'function';
|
|
228
|
-
}
|
|
229
|
-
|
|
230
266
|
function isJSON(value) {
|
|
231
267
|
if (typeof value !== 'string') {
|
|
232
268
|
return false;
|
|
@@ -279,14 +315,6 @@ function isJSONObject(obj) {
|
|
|
279
315
|
return true;
|
|
280
316
|
}
|
|
281
317
|
|
|
282
|
-
function isMap(value) {
|
|
283
|
-
return value instanceof Map;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
function isNil(x) {
|
|
287
|
-
return x == null;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
318
|
function isNode() {
|
|
291
319
|
return typeof process !== 'undefined' && process?.versions?.node != null;
|
|
292
320
|
}
|
|
@@ -295,38 +323,10 @@ function isNotNil(x) {
|
|
|
295
323
|
return x != null;
|
|
296
324
|
}
|
|
297
325
|
|
|
298
|
-
function isNull(x) {
|
|
299
|
-
return x === null;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
326
|
function isPromise(value) {
|
|
303
327
|
return value instanceof Promise;
|
|
304
328
|
}
|
|
305
329
|
|
|
306
|
-
function isRegExp(value) {
|
|
307
|
-
return value instanceof RegExp;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
function isSet(value) {
|
|
311
|
-
return value instanceof Set;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
function isSymbol(value) {
|
|
315
|
-
return typeof value === 'symbol';
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
function isUndefined(x) {
|
|
319
|
-
return x === undefined;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
function isWeakMap(value) {
|
|
323
|
-
return value instanceof WeakMap;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
function isWeakSet(value) {
|
|
327
|
-
return value instanceof WeakSet;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
330
|
exports.eq = eq;
|
|
331
331
|
exports.isArrayBuffer = isArrayBuffer;
|
|
332
332
|
exports.isBlob = isBlob;
|