es-toolkit 1.0.0-dev.24 → 1.0.2-canary.0
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 +2 -2
- package/array.d.ts +1 -0
- package/dist/array/index.js +1 -1
- package/dist/array/uniqWith.d.ts +1 -1
- package/dist/index.js +1 -1
- package/esm/array/chunk.d.ts +24 -0
- package/esm/array/chunk.spec.d.ts +1 -0
- package/esm/array/difference.d.ts +23 -0
- package/esm/array/difference.spec.d.ts +1 -0
- package/esm/array/differenceBy.d.ts +26 -0
- package/esm/array/differenceBy.spec.d.ts +1 -0
- package/esm/array/differenceWith.d.ts +22 -0
- package/esm/array/differenceWith.spec.d.ts +1 -0
- package/esm/array/drop.d.ts +16 -0
- package/esm/array/drop.spec.d.ts +1 -0
- package/esm/array/dropRight.d.ts +16 -0
- package/esm/array/dropRight.spec.d.ts +1 -0
- package/esm/array/dropRightWhile.d.ts +18 -0
- package/esm/array/{dropRightWhile.mjs → dropRightWhile.js} +1 -1
- package/esm/array/dropRightWhile.spec.d.ts +1 -0
- package/esm/array/dropWhile.d.ts +18 -0
- package/esm/array/dropWhile.spec.d.ts +1 -0
- package/esm/array/groupBy.d.ts +31 -0
- package/esm/array/{groupBy.mjs → groupBy.js} +1 -1
- package/esm/array/groupBy.spec.d.ts +1 -0
- package/esm/array/index.d.ts +30 -0
- package/esm/array/index.js +30 -0
- package/esm/array/intersection.d.ts +18 -0
- package/esm/array/intersection.spec.d.ts +1 -0
- package/esm/array/intersectionBy.d.ts +21 -0
- package/esm/array/intersectionBy.spec.d.ts +1 -0
- package/esm/array/intersectionWith.d.ts +22 -0
- package/esm/array/intersectionWith.spec.d.ts +1 -0
- package/esm/array/partition.d.ts +22 -0
- package/esm/array/{partition.mjs → partition.js} +1 -1
- package/esm/array/partition.spec.d.ts +1 -0
- package/esm/array/sample.d.ts +14 -0
- package/esm/array/sample.spec.d.ts +1 -0
- package/esm/array/shuffle.d.ts +14 -0
- package/esm/array/shuffle.spec.d.ts +1 -0
- package/esm/array/take.d.ts +23 -0
- package/esm/array/take.spec.d.ts +1 -0
- package/esm/array/takeRight.d.ts +21 -0
- package/esm/array/takeRight.spec.d.ts +1 -0
- package/esm/array/takeRightWhile.d.ts +18 -0
- package/esm/array/takeRightWhile.spec.d.ts +1 -0
- package/esm/array/takeWhile.d.ts +19 -0
- package/esm/array/{takeWhile.mjs → takeWhile.js} +1 -1
- package/esm/array/takeWhile.spec.d.ts +1 -0
- package/esm/array/union.d.ts +17 -0
- package/esm/array/{union.mjs → union.js} +1 -1
- package/esm/array/union.spec.d.ts +1 -0
- package/esm/array/unionBy.d.ts +21 -0
- package/esm/array/{unionBy.mjs → unionBy.js} +1 -1
- package/esm/array/unionBy.spec.d.ts +1 -0
- package/esm/array/unionWith.d.ts +20 -0
- package/esm/array/{unionWith.mjs → unionWith.js} +1 -1
- package/esm/array/unionWith.spec.d.ts +1 -0
- package/esm/array/uniq.d.ts +15 -0
- package/esm/array/{uniq.mjs → uniq.js} +1 -1
- package/esm/array/uniq.spec.d.ts +1 -0
- package/esm/array/uniqBy.d.ts +12 -0
- package/esm/array/{uniqBy.mjs → uniqBy.js} +1 -1
- package/esm/array/uniqBy.spec.d.ts +1 -0
- package/esm/array/uniqWith.d.ts +12 -0
- package/esm/array/{uniqWith.mjs → uniqWith.js} +2 -2
- package/esm/array/uniqWith.spec.d.ts +1 -0
- package/esm/array/xor.d.ts +17 -0
- package/esm/array/{xor.mjs → xor.js} +3 -3
- package/esm/array/xor.spec.d.ts +1 -0
- package/esm/array/xorBy.d.ts +20 -0
- package/esm/array/{xorBy.mjs → xorBy.js} +3 -3
- package/esm/array/xorBy.spec.d.ts +1 -0
- package/esm/array/xorWith.d.ts +19 -0
- package/esm/array/{xorWith.mjs → xorWith.js} +3 -3
- package/esm/array/xorWith.spec.d.ts +1 -0
- package/esm/array/zip.d.ts +25 -0
- package/esm/array/{zip.mjs → zip.js} +1 -1
- package/esm/array/zip.spec.d.ts +1 -0
- package/esm/array/zipWith.d.ts +32 -0
- package/esm/array/{zipWith.mjs → zipWith.js} +1 -1
- package/esm/array/zipWith.spec.d.ts +1 -0
- package/esm/function/debounce.d.ts +24 -0
- package/esm/function/debounce.spec.d.ts +1 -0
- package/esm/function/index.d.ts +3 -0
- package/esm/function/index.js +3 -0
- package/esm/function/once.d.ts +17 -0
- package/esm/function/once.spec.d.ts +1 -0
- package/esm/function/throttle.d.ts +26 -0
- package/esm/function/throttle.spec.d.ts +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.js +45 -0
- package/esm/math/clamp.d.ts +19 -0
- package/esm/math/clamp.spec.d.ts +1 -0
- package/esm/math/index.d.ts +3 -0
- package/esm/math/index.js +3 -0
- package/esm/math/round.d.ts +16 -0
- package/esm/math/round.spec.d.ts +1 -0
- package/esm/math/sum.d.ts +14 -0
- package/esm/math/{sum.mjs → sum.js} +1 -1
- package/esm/math/sum.spec.d.ts +1 -0
- package/esm/object/index.d.ts +4 -0
- package/esm/object/index.js +4 -0
- package/esm/object/omit.d.ts +16 -0
- package/esm/object/{omit.mjs → omit.js} +1 -1
- package/esm/object/omit.spec.d.ts +1 -0
- package/esm/object/omitBy.d.ts +19 -0
- package/esm/object/{omitBy.mjs → omitBy.js} +1 -1
- package/esm/object/omitBy.spec.d.ts +1 -0
- package/esm/object/pick.d.ts +16 -0
- package/esm/object/{pick.mjs → pick.js} +1 -1
- package/esm/object/pick.spec.d.ts +1 -0
- package/esm/object/pickBy.d.ts +19 -0
- package/esm/object/{pickBy.mjs → pickBy.js} +1 -1
- package/esm/object/pickBy.spec.d.ts +1 -0
- package/esm/package.json +1 -0
- package/esm/predicate/index.d.ts +4 -0
- package/esm/predicate/index.js +4 -0
- package/esm/predicate/isNil.d.ts +20 -0
- package/esm/predicate/isNil.spec.d.ts +1 -0
- package/esm/predicate/isNotNil.d.ts +16 -0
- package/esm/predicate/isNotNil.spec.d.ts +1 -0
- package/esm/predicate/isNull.d.ts +21 -0
- package/esm/predicate/isNull.spec.d.ts +1 -0
- package/esm/predicate/isUndefined.d.ts +21 -0
- package/esm/predicate/isUndefined.spec.d.ts +1 -0
- package/esm/promise/delay.d.ts +19 -0
- package/esm/promise/delay.spec.d.ts +1 -0
- package/esm/promise/index.d.ts +1 -0
- package/esm/promise/index.js +1 -0
- package/function.d.ts +1 -0
- package/math.d.ts +1 -0
- package/object.d.ts +1 -0
- package/package.json +18 -17
- package/predicate.d.ts +1 -0
- package/promise.d.ts +1 -0
- package/esm/array/index.mjs +0 -30
- package/esm/function/index.mjs +0 -3
- package/esm/index.mjs +0 -45
- package/esm/math/index.mjs +0 -3
- package/esm/object/index.mjs +0 -4
- package/esm/predicate/index.mjs +0 -4
- package/esm/promise/index.mjs +0 -1
- /package/esm/_virtual/{_rollupPluginBabelHelpers.mjs → _rollupPluginBabelHelpers.js} +0 -0
- /package/esm/array/_virtual/{_rollupPluginBabelHelpers.mjs → _rollupPluginBabelHelpers.js} +0 -0
- /package/esm/array/{chunk.mjs → chunk.js} +0 -0
- /package/esm/array/{difference.mjs → difference.js} +0 -0
- /package/esm/array/{differenceBy.mjs → differenceBy.js} +0 -0
- /package/esm/array/{differenceWith.mjs → differenceWith.js} +0 -0
- /package/esm/array/{drop.mjs → drop.js} +0 -0
- /package/esm/array/{dropRight.mjs → dropRight.js} +0 -0
- /package/esm/array/{dropWhile.mjs → dropWhile.js} +0 -0
- /package/esm/array/{intersection.mjs → intersection.js} +0 -0
- /package/esm/array/{intersectionBy.mjs → intersectionBy.js} +0 -0
- /package/esm/array/{intersectionWith.mjs → intersectionWith.js} +0 -0
- /package/esm/array/{sample.mjs → sample.js} +0 -0
- /package/esm/array/{shuffle.mjs → shuffle.js} +0 -0
- /package/esm/array/{take.mjs → take.js} +0 -0
- /package/esm/array/{takeRight.mjs → takeRight.js} +0 -0
- /package/esm/array/{takeRightWhile.mjs → takeRightWhile.js} +0 -0
- /package/esm/function/{debounce.mjs → debounce.js} +0 -0
- /package/esm/function/{once.mjs → once.js} +0 -0
- /package/esm/function/{throttle.mjs → throttle.js} +0 -0
- /package/esm/math/_virtual/{_rollupPluginBabelHelpers.mjs → _rollupPluginBabelHelpers.js} +0 -0
- /package/esm/math/{clamp.mjs → clamp.js} +0 -0
- /package/esm/math/{round.mjs → round.js} +0 -0
- /package/esm/object/_virtual/{_rollupPluginBabelHelpers.mjs → _rollupPluginBabelHelpers.js} +0 -0
- /package/esm/predicate/{isNil.mjs → isNil.js} +0 -0
- /package/esm/predicate/{isNotNil.mjs → isNotNil.js} +0 -0
- /package/esm/predicate/{isNull.mjs → isNull.js} +0 -0
- /package/esm/predicate/{isUndefined.mjs → isUndefined.js} +0 -0
- /package/esm/promise/{delay.mjs → delay.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from './_virtual/_rollupPluginBabelHelpers.
|
|
1
|
+
import { slicedToArray as _slicedToArray } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates a new object composed of the properties that do not satisfy the predicate function.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new object composed of the picked object properties.
|
|
3
|
+
*
|
|
4
|
+
* This function takes an object and an array of keys, and returns a new object that
|
|
5
|
+
* includes only the properties corresponding to the specified keys.
|
|
6
|
+
*
|
|
7
|
+
* @param {T} obj - The object to pick keys from.
|
|
8
|
+
* @param {K[]} keys - An array of keys to be picked from the object.
|
|
9
|
+
* @returns {Pick<T, K>} A new object with the specified keys picked.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* * const obj = { a: 1, b: 2, c: 3 };
|
|
13
|
+
* const result = pick(obj, ['a', 'c']);
|
|
14
|
+
* // result will be { a: 1, c: 3 }
|
|
15
|
+
*/
|
|
16
|
+
export declare function pick<T, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createForOfIteratorHelper as _createForOfIteratorHelper } from './_virtual/_rollupPluginBabelHelpers.
|
|
1
|
+
import { createForOfIteratorHelper as _createForOfIteratorHelper } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates a new object composed of the picked object properties.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new object composed of the properties that satisfy the predicate function.
|
|
3
|
+
*
|
|
4
|
+
* This function takes an object and a predicate function, and returns a new object that
|
|
5
|
+
* includes only the properties for which the predicate function returns true.
|
|
6
|
+
*
|
|
7
|
+
* @param {T} obj - The object to pick properties from.
|
|
8
|
+
* @param {(value: T[keyof T], key: string) => boolean} shouldPick - A predicate function that determines
|
|
9
|
+
* whether a property should be picked. It takes the property's key and value as arguments and returns `true`
|
|
10
|
+
* if the property should be picked, and `false` otherwise.
|
|
11
|
+
* @returns {Partial<T>} A new object with the properties that satisfy the predicate function.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* const obj = { a: 1, b: 'pick', c: 3 };
|
|
15
|
+
* const shouldPick = (value) => typeof value === 'string';
|
|
16
|
+
* const result = pickBy(obj, shouldPick);
|
|
17
|
+
* // result will be { b: 'pick' }
|
|
18
|
+
*/
|
|
19
|
+
export declare function pickBy<T extends Record<string, any>>(obj: T, shouldPick: (value: T[keyof T], key: string) => boolean): Partial<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from './_virtual/_rollupPluginBabelHelpers.
|
|
1
|
+
import { slicedToArray as _slicedToArray } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates a new object composed of the properties that satisfy the predicate function.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a given value is null or undefined.
|
|
3
|
+
*
|
|
4
|
+
* This function tests whether the provided value is either `null` or `undefined`.
|
|
5
|
+
* It returns `true` if the value is `null` or `undefined`, and `false` otherwise.
|
|
6
|
+
*
|
|
7
|
+
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `null` or `undefined`.
|
|
8
|
+
*
|
|
9
|
+
* @param {unknown} x - The value to test for null or undefined.
|
|
10
|
+
* @returns {boolean} `true` if the value is null or undefined, `false` otherwise.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* * const value1 = null;
|
|
14
|
+
* const value2 = undefined;
|
|
15
|
+
* const value3 = 42;
|
|
16
|
+
* const result1 = isNil(value1); // true
|
|
17
|
+
* const result2 = isNil(value2); // true
|
|
18
|
+
* const result3 = isNil(value3); // false
|
|
19
|
+
*/
|
|
20
|
+
export declare function isNil(x: unknown): x is null | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the given value is not null nor undefined.
|
|
3
|
+
*
|
|
4
|
+
* The main use of this function is to be used with TypeScript as a type predicate.
|
|
5
|
+
*
|
|
6
|
+
* @param {T | null | undefined} x - The value to test if it is not null nor undefined.
|
|
7
|
+
* @returns {x is T} True if the value is not null nor undefined, false otherwise.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Here the type of `arr` is (number | undefined)[]
|
|
11
|
+
* const arr = [1, undefined, 3];
|
|
12
|
+
* // Here the type of `result` is number[]
|
|
13
|
+
* const result = arr.filter(isNotNil);
|
|
14
|
+
* // result will be [1, 3]
|
|
15
|
+
*/
|
|
16
|
+
export declare function isNotNil<T>(x: T | null | undefined): x is T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the given value is null.
|
|
3
|
+
*
|
|
4
|
+
* This function tests whether the provided value is strictly equal to `null`.
|
|
5
|
+
* It returns `true` if the value is `null`, and `false` otherwise.
|
|
6
|
+
*
|
|
7
|
+
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `null`.
|
|
8
|
+
*
|
|
9
|
+
* @param {unknown} x - The value to test if it is null.
|
|
10
|
+
* @returns {x is null} True if the value is null, false otherwise.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* * const value1 = null;
|
|
14
|
+
* const value2 = undefined;
|
|
15
|
+
* const value3 = 42;
|
|
16
|
+
*
|
|
17
|
+
* console.log(isNull(value1)); // true
|
|
18
|
+
* console.log(isNull(value2)); // false
|
|
19
|
+
* console.log(isNull(value3)); // false
|
|
20
|
+
*/
|
|
21
|
+
export declare function isNull(x: unknown): x is null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the given value is undefined.
|
|
3
|
+
*
|
|
4
|
+
* This function tests whether the provided value is strictly equal to `undefined`.
|
|
5
|
+
* It returns `true` if the value is `undefined`, and `false` otherwise.
|
|
6
|
+
*
|
|
7
|
+
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `undefined`.
|
|
8
|
+
*
|
|
9
|
+
* @param {unknown} x - The value to test if it is undefined.
|
|
10
|
+
* @returns {x is undefined} true if the value is undefined, false otherwise.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* * const value1 = undefined;
|
|
14
|
+
* const value2 = null;
|
|
15
|
+
* const value3 = 42;
|
|
16
|
+
*
|
|
17
|
+
* console.log(isUndefined(value1)); // true
|
|
18
|
+
* console.log(isUndefined(value2)); // false
|
|
19
|
+
* console.log(isUndefined(value3)); // false
|
|
20
|
+
*/
|
|
21
|
+
export declare function isUndefined(x: unknown): x is undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delays the execution of code for a specified number of milliseconds.
|
|
3
|
+
*
|
|
4
|
+
* This function returns a Promise that resolves after the specified delay, allowing you to use it
|
|
5
|
+
* with async/await to pause execution.
|
|
6
|
+
*
|
|
7
|
+
* @param {number} ms - The number of milliseconds to delay.
|
|
8
|
+
* @returns {Promise<void>} A Promise that resolves after the specified delay.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* async function foo() {
|
|
12
|
+
* console.log('Start');
|
|
13
|
+
* await delay(1000); // Delays execution for 1 second
|
|
14
|
+
* console.log('End');
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* foo();
|
|
18
|
+
*/
|
|
19
|
+
export declare function delay(ms: number): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { delay } from './delay';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { delay } from './delay.js';
|
package/function.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/function';
|
package/math.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/math';
|
package/object.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/object';
|
package/package.json
CHANGED
|
@@ -1,75 +1,76 @@
|
|
|
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.0.
|
|
4
|
+
"version": "1.0.2-canary.0",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"docs"
|
|
7
7
|
],
|
|
8
8
|
"packageManager": "yarn@4.2.2",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"import": "./esm/index.
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
12
|
"require": "./dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"./array": {
|
|
15
|
-
"import": "./esm/array/index.
|
|
15
|
+
"import": "./esm/array/index.js",
|
|
16
16
|
"require": "./dist/array/index.js"
|
|
17
17
|
},
|
|
18
18
|
"./function": {
|
|
19
|
-
"import": "./esm/function/index.
|
|
19
|
+
"import": "./esm/function/index.js",
|
|
20
20
|
"require": "./dist/function/index.js"
|
|
21
21
|
},
|
|
22
22
|
"./math": {
|
|
23
|
-
"import": "./esm/math/index.
|
|
23
|
+
"import": "./esm/math/index.js",
|
|
24
24
|
"require": "./dist/math/index.js"
|
|
25
25
|
},
|
|
26
26
|
"./object": {
|
|
27
|
-
"import": "./esm/object/index.
|
|
27
|
+
"import": "./esm/object/index.js",
|
|
28
28
|
"require": "./dist/object/index.js"
|
|
29
29
|
},
|
|
30
30
|
"./predicate": {
|
|
31
|
-
"import": "./esm/predicate/index.
|
|
31
|
+
"import": "./esm/predicate/index.js",
|
|
32
32
|
"require": "./dist/predicate/index.js"
|
|
33
33
|
},
|
|
34
34
|
"./promise": {
|
|
35
|
-
"import": "./esm/promise/index.
|
|
35
|
+
"import": "./esm/promise/index.js",
|
|
36
36
|
"require": "./dist/promise/index.js"
|
|
37
37
|
},
|
|
38
38
|
"./package.json": "./package.json"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist/**/*",
|
|
42
|
-
"esm/**/*"
|
|
42
|
+
"esm/**/*",
|
|
43
|
+
"*.d.ts"
|
|
43
44
|
],
|
|
44
45
|
"publishConfig": {
|
|
45
46
|
"access": "public",
|
|
46
47
|
"exports": {
|
|
47
48
|
".": {
|
|
48
|
-
"import": "./esm/index.
|
|
49
|
+
"import": "./esm/index.js",
|
|
49
50
|
"require": "./dist/index.js"
|
|
50
51
|
},
|
|
51
52
|
"./array": {
|
|
52
|
-
"import": "./esm/array/index.
|
|
53
|
+
"import": "./esm/array/index.js",
|
|
53
54
|
"require": "./dist/array/index.js"
|
|
54
55
|
},
|
|
55
56
|
"./function": {
|
|
56
|
-
"import": "./esm/function/index.
|
|
57
|
+
"import": "./esm/function/index.js",
|
|
57
58
|
"require": "./dist/function/index.js"
|
|
58
59
|
},
|
|
59
60
|
"./math": {
|
|
60
|
-
"import": "./esm/math/index.
|
|
61
|
+
"import": "./esm/math/index.js",
|
|
61
62
|
"require": "./dist/math/index.js"
|
|
62
63
|
},
|
|
63
64
|
"./object": {
|
|
64
|
-
"import": "./esm/object/index.
|
|
65
|
+
"import": "./esm/object/index.js",
|
|
65
66
|
"require": "./dist/object/index.js"
|
|
66
67
|
},
|
|
67
68
|
"./predicate": {
|
|
68
|
-
"import": "./esm/predicate/index.
|
|
69
|
+
"import": "./esm/predicate/index.js",
|
|
69
70
|
"require": "./dist/predicate/index.js"
|
|
70
71
|
},
|
|
71
72
|
"./promise": {
|
|
72
|
-
"import": "./esm/promise/index.
|
|
73
|
+
"import": "./esm/promise/index.js",
|
|
73
74
|
"require": "./dist/promise/index.js"
|
|
74
75
|
},
|
|
75
76
|
"./package.json": "./package.json"
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
"sideEffects": false,
|
|
103
104
|
"scripts": {
|
|
104
105
|
"prepack": "yarn build",
|
|
105
|
-
"build": "rm -rf dist esm && tsc -p tsconfig.json --declaration --emitDeclarationOnly --declarationDir dist && rollup -c rollup.config.js",
|
|
106
|
+
"build": "rm -rf dist esm && tsc -p tsconfig.json --declaration --emitDeclarationOnly --declarationDir dist && tsc -p tsconfig.json --declaration --emitDeclarationOnly --declarationDir esm && rollup -c rollup.config.js && ./.scripts/postbuild.sh",
|
|
106
107
|
"test": "vitest run --coverage --typecheck"
|
|
107
108
|
}
|
|
108
109
|
}
|
package/predicate.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/predicate';
|
package/promise.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/promise';
|
package/esm/array/index.mjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export { chunk } from './chunk.mjs';
|
|
2
|
-
export { difference } from './difference.mjs';
|
|
3
|
-
export { differenceBy } from './differenceBy.mjs';
|
|
4
|
-
export { differenceWith } from './differenceWith.mjs';
|
|
5
|
-
export { drop } from './drop.mjs';
|
|
6
|
-
export { dropRight } from './dropRight.mjs';
|
|
7
|
-
export { dropRightWhile } from './dropRightWhile.mjs';
|
|
8
|
-
export { dropWhile } from './dropWhile.mjs';
|
|
9
|
-
export { groupBy } from './groupBy.mjs';
|
|
10
|
-
export { intersection } from './intersection.mjs';
|
|
11
|
-
export { intersectionBy } from './intersectionBy.mjs';
|
|
12
|
-
export { intersectionWith } from './intersectionWith.mjs';
|
|
13
|
-
export { partition } from './partition.mjs';
|
|
14
|
-
export { sample } from './sample.mjs';
|
|
15
|
-
export { shuffle } from './shuffle.mjs';
|
|
16
|
-
export { take } from './take.mjs';
|
|
17
|
-
export { takeRight } from './takeRight.mjs';
|
|
18
|
-
export { takeRightWhile } from './takeRightWhile.mjs';
|
|
19
|
-
export { takeWhile } from './takeWhile.mjs';
|
|
20
|
-
export { union } from './union.mjs';
|
|
21
|
-
export { unionBy } from './unionBy.mjs';
|
|
22
|
-
export { unionWith } from './unionWith.mjs';
|
|
23
|
-
export { uniq } from './uniq.mjs';
|
|
24
|
-
export { uniqBy } from './uniqBy.mjs';
|
|
25
|
-
export { uniqWith } from './uniqWith.mjs';
|
|
26
|
-
export { xor } from './xor.mjs';
|
|
27
|
-
export { xorBy } from './xorBy.mjs';
|
|
28
|
-
export { xorWith } from './xorWith.mjs';
|
|
29
|
-
export { zip } from './zip.mjs';
|
|
30
|
-
export { zipWith } from './zipWith.mjs';
|
package/esm/function/index.mjs
DELETED
package/esm/index.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export { chunk } from './array/chunk.mjs';
|
|
2
|
-
export { difference } from './array/difference.mjs';
|
|
3
|
-
export { differenceBy } from './array/differenceBy.mjs';
|
|
4
|
-
export { differenceWith } from './array/differenceWith.mjs';
|
|
5
|
-
export { drop } from './array/drop.mjs';
|
|
6
|
-
export { dropRight } from './array/dropRight.mjs';
|
|
7
|
-
export { dropRightWhile } from './array/dropRightWhile.mjs';
|
|
8
|
-
export { dropWhile } from './array/dropWhile.mjs';
|
|
9
|
-
export { groupBy } from './array/groupBy.mjs';
|
|
10
|
-
export { intersection } from './array/intersection.mjs';
|
|
11
|
-
export { intersectionBy } from './array/intersectionBy.mjs';
|
|
12
|
-
export { intersectionWith } from './array/intersectionWith.mjs';
|
|
13
|
-
export { partition } from './array/partition.mjs';
|
|
14
|
-
export { sample } from './array/sample.mjs';
|
|
15
|
-
export { shuffle } from './array/shuffle.mjs';
|
|
16
|
-
export { take } from './array/take.mjs';
|
|
17
|
-
export { takeRight } from './array/takeRight.mjs';
|
|
18
|
-
export { takeRightWhile } from './array/takeRightWhile.mjs';
|
|
19
|
-
export { takeWhile } from './array/takeWhile.mjs';
|
|
20
|
-
export { union } from './array/union.mjs';
|
|
21
|
-
export { unionBy } from './array/unionBy.mjs';
|
|
22
|
-
export { unionWith } from './array/unionWith.mjs';
|
|
23
|
-
export { uniq } from './array/uniq.mjs';
|
|
24
|
-
export { uniqBy } from './array/uniqBy.mjs';
|
|
25
|
-
export { uniqWith } from './array/uniqWith.mjs';
|
|
26
|
-
export { xor } from './array/xor.mjs';
|
|
27
|
-
export { xorBy } from './array/xorBy.mjs';
|
|
28
|
-
export { xorWith } from './array/xorWith.mjs';
|
|
29
|
-
export { zip } from './array/zip.mjs';
|
|
30
|
-
export { zipWith } from './array/zipWith.mjs';
|
|
31
|
-
export { debounce } from './function/debounce.mjs';
|
|
32
|
-
export { once } from './function/once.mjs';
|
|
33
|
-
export { throttle } from './function/throttle.mjs';
|
|
34
|
-
export { clamp } from './math/clamp.mjs';
|
|
35
|
-
export { round } from './math/round.mjs';
|
|
36
|
-
export { sum } from './math/sum.mjs';
|
|
37
|
-
export { omit } from './object/omit.mjs';
|
|
38
|
-
export { omitBy } from './object/omitBy.mjs';
|
|
39
|
-
export { pick } from './object/pick.mjs';
|
|
40
|
-
export { pickBy } from './object/pickBy.mjs';
|
|
41
|
-
export { isNil } from './predicate/isNil.mjs';
|
|
42
|
-
export { isNotNil } from './predicate/isNotNil.mjs';
|
|
43
|
-
export { isNull } from './predicate/isNull.mjs';
|
|
44
|
-
export { isUndefined } from './predicate/isUndefined.mjs';
|
|
45
|
-
export { delay } from './promise/delay.mjs';
|
package/esm/math/index.mjs
DELETED
package/esm/object/index.mjs
DELETED
package/esm/predicate/index.mjs
DELETED
package/esm/promise/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { delay } from './delay.mjs';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|