es-toolkit 1.12.0-dev.287 → 1.12.0-dev.289
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.js +6 -0
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +6 -5
- package/dist/browser.mjs.map +1 -1
- package/dist/chunk-27QMXBLJ.mjs +9 -0
- package/dist/chunk-27QMXBLJ.mjs.map +1 -0
- package/dist/chunk-B645AYL4.mjs +1 -0
- package/dist/{chunk-GP2O5UBG.mjs → chunk-UTBNEZQX.mjs} +9 -5
- package/dist/{chunk-GP2O5UBG.mjs.map → chunk-UTBNEZQX.mjs.map} +1 -1
- package/dist/{chunk-32AEPQYI.mjs → chunk-Y5V7UAZZ.mjs} +4 -4
- package/dist/compat/index.d.mts +1 -0
- package/dist/compat/index.d.ts +1 -0
- package/dist/compat/index.js +7 -0
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +11 -7
- package/dist/compat/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -7
- package/dist/predicate/index.d.mts +1 -0
- package/dist/predicate/index.d.ts +1 -0
- package/dist/predicate/index.js +7 -0
- package/dist/predicate/index.js.map +1 -1
- package/dist/predicate/index.mjs +8 -4
- package/dist/predicate/isLength.d.mts +3 -0
- package/dist/predicate/isLength.d.ts +3 -0
- package/dist/predicate/isLength.js +33 -0
- package/dist/predicate/isLength.js.map +1 -0
- package/dist/predicate/isLength.mjs +8 -0
- package/dist/predicate/isLength.mjs.map +1 -0
- package/dist/string/camelCase.mjs +2 -2
- package/dist/string/index.mjs +2 -2
- package/package.json +1 -1
- package/umd/browser.global.js +1 -1
- package/dist/chunk-WGX4WINP.mjs +0 -1
- /package/dist/{chunk-WGX4WINP.mjs.map → chunk-B645AYL4.mjs.map} +0 -0
- /package/dist/{chunk-32AEPQYI.mjs.map → chunk-Y5V7UAZZ.mjs.map} +0 -0
package/dist/browser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
src_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTBNEZQX.mjs";
|
|
4
4
|
import "./chunk-XT74R35S.mjs";
|
|
5
5
|
import "./chunk-EYYZQFOP.mjs";
|
|
6
6
|
import "./chunk-5IKVJGHO.mjs";
|
|
@@ -10,15 +10,16 @@ import "./chunk-4OIZM4HS.mjs";
|
|
|
10
10
|
import "./chunk-IIDZ3KAJ.mjs";
|
|
11
11
|
import "./chunk-CVVZHOJX.mjs";
|
|
12
12
|
import "./chunk-O64NE2P4.mjs";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-WVQ7YVRK.mjs";
|
|
13
|
+
import "./chunk-Y5V7UAZZ.mjs";
|
|
15
14
|
import "./chunk-U56ZOM7L.mjs";
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-WVQ7YVRK.mjs";
|
|
16
|
+
import "./chunk-B645AYL4.mjs";
|
|
17
|
+
import "./chunk-AIRSKN47.mjs";
|
|
17
18
|
import "./chunk-VH2PV426.mjs";
|
|
18
19
|
import "./chunk-JYSV56US.mjs";
|
|
20
|
+
import "./chunk-27QMXBLJ.mjs";
|
|
19
21
|
import "./chunk-WMM7TZLG.mjs";
|
|
20
22
|
import "./chunk-BMRTZMRE.mjs";
|
|
21
|
-
import "./chunk-AIRSKN47.mjs";
|
|
22
23
|
import "./chunk-54TK5BIS.mjs";
|
|
23
24
|
import "./chunk-BCTYOXT7.mjs";
|
|
24
25
|
import "./chunk-HPFDYUGP.mjs";
|
package/dist/browser.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/browser.ts"],"sourcesContent":["import * as toolkit from './index';\n\ninterface Window {\n _: typeof toolkit;\n}\n\ndeclare var window: Window;\nwindow._ = toolkit;\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/browser.ts"],"sourcesContent":["import * as toolkit from './index';\n\ninterface Window {\n _: typeof toolkit;\n}\n\ndeclare var window: Window;\nwindow._ = toolkit;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,OAAO,IAAI;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/predicate/isLength.ts"],"sourcesContent":["export function isLength(value: unknown): value is number {\n return typeof value === 'number' && value > -1 && value % 1 === 0 && value <= Number.MAX_SAFE_INTEGER;\n}\n"],"mappings":";AAAO,SAAS,SAAS,OAAiC;AACxD,SAAO,OAAO,UAAU,YAAY,QAAQ,MAAM,QAAQ,MAAM,KAAK,SAAS,OAAO;AACvF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-B645AYL4.mjs.map
|
|
@@ -18,25 +18,28 @@ import {
|
|
|
18
18
|
} from "./chunk-O64NE2P4.mjs";
|
|
19
19
|
import {
|
|
20
20
|
camelCase
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-Y5V7UAZZ.mjs";
|
|
22
22
|
import {
|
|
23
23
|
capitalize
|
|
24
24
|
} from "./chunk-U56ZOM7L.mjs";
|
|
25
|
+
import {
|
|
26
|
+
isNull
|
|
27
|
+
} from "./chunk-AIRSKN47.mjs";
|
|
25
28
|
import {
|
|
26
29
|
isUndefined
|
|
27
30
|
} from "./chunk-VH2PV426.mjs";
|
|
28
31
|
import {
|
|
29
32
|
isEqual
|
|
30
33
|
} from "./chunk-JYSV56US.mjs";
|
|
34
|
+
import {
|
|
35
|
+
isLength
|
|
36
|
+
} from "./chunk-27QMXBLJ.mjs";
|
|
31
37
|
import {
|
|
32
38
|
isNil
|
|
33
39
|
} from "./chunk-WMM7TZLG.mjs";
|
|
34
40
|
import {
|
|
35
41
|
isNotNil
|
|
36
42
|
} from "./chunk-BMRTZMRE.mjs";
|
|
37
|
-
import {
|
|
38
|
-
isNull
|
|
39
|
-
} from "./chunk-AIRSKN47.mjs";
|
|
40
43
|
import {
|
|
41
44
|
omitBy
|
|
42
45
|
} from "./chunk-BCTYOXT7.mjs";
|
|
@@ -305,6 +308,7 @@ __export(src_exports, {
|
|
|
305
308
|
intersectionWith: () => intersectionWith,
|
|
306
309
|
invert: () => invert,
|
|
307
310
|
isEqual: () => isEqual,
|
|
311
|
+
isLength: () => isLength,
|
|
308
312
|
isNil: () => isNil,
|
|
309
313
|
isNotNil: () => isNotNil,
|
|
310
314
|
isNull: () => isNull,
|
|
@@ -366,4 +370,4 @@ __export(src_exports, {
|
|
|
366
370
|
export {
|
|
367
371
|
src_exports
|
|
368
372
|
};
|
|
369
|
-
//# sourceMappingURL=chunk-
|
|
373
|
+
//# sourceMappingURL=chunk-UTBNEZQX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * es-toolkit\n * ====================================\n * A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller—a major upgrade to lodash.\n *\n * es-toolkit is a state-of-the-art, high-performance JavaScript utility library\n * with a small bundle size and strong type annotations.\n *\n * - es-toolkit offers a variety of everyday utility functions with modern implementations, such as [debounce](https://es-toolkit.slash.page/reference/function/debounce.html), [delay](https://es-toolkit.slash.page/reference/promise/delay.html), [chunk](https://es-toolkit.slash.page/reference/array/chunk.html), [sum](https://es-toolkit.slash.page/reference/math/sum.html), and [pick](https://es-toolkit.slash.page/reference/object/pick.html).\n * - Designed with performance in mind, es-toolkit achieves [2-3× better performance](https://es-toolkit.slash.page/performance.html) in modern JavaScript environments.\n * - es-toolkit supports tree shaking out of the box, and [reduces JavaScript code by up to 97%](https://es-toolkit.slash.page/bundle-size.html) compared to other libraries.\n * - es-toolkit includes built-in TypeScript support, with straightforward yet robust types. It also provides useful type guards such as [isNotNil](https://es-toolkit.slash.page/reference/predicate/isNotNil.html).\n * - es-toolkit is battle-tested with 100% test coverage, ensuring reliability and robustness.\n *\n * Here are some of the features es-toolkit offers:\n *\n * - **Array**: Utilities for array manipulation, such as [uniq](https://es-toolkit.slash.page/reference/array/uniq.html) and [difference](https://es-toolkit.slash.page/reference/array/difference.html).\n * - **Function**: Tools for controlling function execution, including [debounce](https://es-toolkit.slash.page/reference/function/debounce.html) and [throttle](https://es-toolkit.slash.page/reference/function/throttle.html).\n * - **Math**: Numerical utilities like [sum](https://es-toolkit.slash.page/reference/math/sum.html) and [round](https://es-toolkit.slash.page/reference/math/round.html).\n * - **Object**: Tools for manipulating JavaScript objects, such as [pick](https://es-toolkit.slash.page/reference/object/pick.html) and [omit](https://es-toolkit.slash.page/reference/object/omit.html).\n * - **Predicate**: Type guard functions like [isNotNil](https://es-toolkit.slash.page/reference/predicate/isNotNil.html).\n * - **Promise**: Asynchronous utilities like [delay](https://es-toolkit.slash.page/reference/promise/delay.html).\n * - **String**: Utilities for string manipulation, such as [snakeCase](https://es-toolkit.slash.page/reference/string/snakeCase.html)\n *\n * If you want to know more about the project, please take a look at the\n * following resources:\n *\n * - [GitHub](https://github.com/toss/es-toolkit)\n * - [Documentation](https://es-toolkit.slash.page)\n *\n * @module\n */\nexport * from './array/index.ts';\nexport * from './error/index.ts';\nexport * from './function/index.ts';\nexport * from './math/index.ts';\nexport * from './object/index.ts';\nexport * from './predicate/index.ts';\nexport * from './promise/index.ts';\nexport * from './string/index.ts';\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * es-toolkit\n * ====================================\n * A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller—a major upgrade to lodash.\n *\n * es-toolkit is a state-of-the-art, high-performance JavaScript utility library\n * with a small bundle size and strong type annotations.\n *\n * - es-toolkit offers a variety of everyday utility functions with modern implementations, such as [debounce](https://es-toolkit.slash.page/reference/function/debounce.html), [delay](https://es-toolkit.slash.page/reference/promise/delay.html), [chunk](https://es-toolkit.slash.page/reference/array/chunk.html), [sum](https://es-toolkit.slash.page/reference/math/sum.html), and [pick](https://es-toolkit.slash.page/reference/object/pick.html).\n * - Designed with performance in mind, es-toolkit achieves [2-3× better performance](https://es-toolkit.slash.page/performance.html) in modern JavaScript environments.\n * - es-toolkit supports tree shaking out of the box, and [reduces JavaScript code by up to 97%](https://es-toolkit.slash.page/bundle-size.html) compared to other libraries.\n * - es-toolkit includes built-in TypeScript support, with straightforward yet robust types. It also provides useful type guards such as [isNotNil](https://es-toolkit.slash.page/reference/predicate/isNotNil.html).\n * - es-toolkit is battle-tested with 100% test coverage, ensuring reliability and robustness.\n *\n * Here are some of the features es-toolkit offers:\n *\n * - **Array**: Utilities for array manipulation, such as [uniq](https://es-toolkit.slash.page/reference/array/uniq.html) and [difference](https://es-toolkit.slash.page/reference/array/difference.html).\n * - **Function**: Tools for controlling function execution, including [debounce](https://es-toolkit.slash.page/reference/function/debounce.html) and [throttle](https://es-toolkit.slash.page/reference/function/throttle.html).\n * - **Math**: Numerical utilities like [sum](https://es-toolkit.slash.page/reference/math/sum.html) and [round](https://es-toolkit.slash.page/reference/math/round.html).\n * - **Object**: Tools for manipulating JavaScript objects, such as [pick](https://es-toolkit.slash.page/reference/object/pick.html) and [omit](https://es-toolkit.slash.page/reference/object/omit.html).\n * - **Predicate**: Type guard functions like [isNotNil](https://es-toolkit.slash.page/reference/predicate/isNotNil.html).\n * - **Promise**: Asynchronous utilities like [delay](https://es-toolkit.slash.page/reference/promise/delay.html).\n * - **String**: Utilities for string manipulation, such as [snakeCase](https://es-toolkit.slash.page/reference/string/snakeCase.html)\n *\n * If you want to know more about the project, please take a look at the\n * following resources:\n *\n * - [GitHub](https://github.com/toss/es-toolkit)\n * - [Documentation](https://es-toolkit.slash.page)\n *\n * @module\n */\nexport * from './array/index.ts';\nexport * from './error/index.ts';\nexport * from './function/index.ts';\nexport * from './math/index.ts';\nexport * from './object/index.ts';\nexport * from './predicate/index.ts';\nexport * from './promise/index.ts';\nexport * from './string/index.ts';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getWords
|
|
3
|
-
} from "./chunk-WVQ7YVRK.mjs";
|
|
4
1
|
import {
|
|
5
2
|
capitalize
|
|
6
3
|
} from "./chunk-U56ZOM7L.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getWords
|
|
6
|
+
} from "./chunk-WVQ7YVRK.mjs";
|
|
7
7
|
|
|
8
8
|
// src/string/camelCase.ts
|
|
9
9
|
function camelCase(str) {
|
|
@@ -18,4 +18,4 @@ function camelCase(str) {
|
|
|
18
18
|
export {
|
|
19
19
|
camelCase
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-Y5V7UAZZ.mjs.map
|
package/dist/compat/index.d.mts
CHANGED
|
@@ -76,6 +76,7 @@ export { isNil } from '../predicate/isNil.mjs';
|
|
|
76
76
|
export { isNotNil } from '../predicate/isNotNil.mjs';
|
|
77
77
|
export { isNull } from '../predicate/isNull.mjs';
|
|
78
78
|
export { isUndefined } from '../predicate/isUndefined.mjs';
|
|
79
|
+
export { isLength } from '../predicate/isLength.mjs';
|
|
79
80
|
export { delay } from '../promise/delay.mjs';
|
|
80
81
|
export { withTimeout } from '../promise/withTimeout.mjs';
|
|
81
82
|
export { camelCase } from '../string/camelCase.mjs';
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ export { isNil } from '../predicate/isNil.js';
|
|
|
76
76
|
export { isNotNil } from '../predicate/isNotNil.js';
|
|
77
77
|
export { isNull } from '../predicate/isNull.js';
|
|
78
78
|
export { isUndefined } from '../predicate/isUndefined.js';
|
|
79
|
+
export { isLength } from '../predicate/isLength.js';
|
|
79
80
|
export { delay } from '../promise/delay.js';
|
|
80
81
|
export { withTimeout } from '../promise/withTimeout.js';
|
|
81
82
|
export { camelCase } from '../string/camelCase.js';
|
package/dist/compat/index.js
CHANGED
|
@@ -91,6 +91,7 @@ __export(compat_exports, {
|
|
|
91
91
|
intersectionWith: () => intersectionWith,
|
|
92
92
|
invert: () => invert,
|
|
93
93
|
isEqual: () => isEqual,
|
|
94
|
+
isLength: () => isLength,
|
|
94
95
|
isNil: () => isNil,
|
|
95
96
|
isNotNil: () => isNotNil,
|
|
96
97
|
isNull: () => isNull,
|
|
@@ -1028,6 +1029,11 @@ function isUndefined(x) {
|
|
|
1028
1029
|
return x === void 0;
|
|
1029
1030
|
}
|
|
1030
1031
|
|
|
1032
|
+
// src/predicate/isLength.ts
|
|
1033
|
+
function isLength(value) {
|
|
1034
|
+
return typeof value === "number" && value > -1 && value % 1 === 0 && value <= Number.MAX_SAFE_INTEGER;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1031
1037
|
// src/promise/delay.ts
|
|
1032
1038
|
function delay(ms, { signal } = {}) {
|
|
1033
1039
|
return new Promise((resolve, reject) => {
|
|
@@ -1364,6 +1370,7 @@ function min(items = []) {
|
|
|
1364
1370
|
intersectionWith,
|
|
1365
1371
|
invert,
|
|
1366
1372
|
isEqual,
|
|
1373
|
+
isLength,
|
|
1367
1374
|
isNil,
|
|
1368
1375
|
isNotNil,
|
|
1369
1376
|
isNull,
|