es-toolkit 1.0.2-dev.32 → 1.0.2-dev.34

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/array.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/array';
@@ -721,7 +721,7 @@ function unionBy(arr1, arr2, mapper) {
721
721
  *
722
722
  * @example
723
723
  * ```ts
724
- * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => );
724
+ * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1);
725
725
  * // [1, 2, 3, 5, 7]
726
726
  * ```
727
727
  */
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @example
7
7
  * ```ts
8
- * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => );
8
+ * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1);
9
9
  * // [1, 2, 3, 5, 7]
10
10
  * ```
11
11
  */
package/dist/index.js CHANGED
@@ -806,7 +806,7 @@ function unionBy(arr1, arr2, mapper) {
806
806
  *
807
807
  * @example
808
808
  * ```ts
809
- * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => );
809
+ * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1);
810
810
  * // [1, 2, 3, 5, 7]
811
811
  * ```
812
812
  */
@@ -7,7 +7,7 @@ import { createForOfIteratorHelper as _createForOfIteratorHelper } from './_virt
7
7
  *
8
8
  * @example
9
9
  * ```ts
10
- * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => );
10
+ * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1);
11
11
  * // [1, 2, 3, 5, 7]
12
12
  * ```
13
13
  */
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,37 +1,44 @@
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.2-dev.32+dcf0fb14",
4
+ "version": "1.0.2-dev.34+848f2c66",
5
5
  "workspaces": [
6
6
  "docs"
7
7
  ],
8
8
  "packageManager": "yarn@4.2.2",
9
9
  "exports": {
10
10
  ".": {
11
+ "types": "./dist/index.d.ts",
11
12
  "import": "./esm/index.mjs",
12
13
  "require": "./dist/index.js"
13
14
  },
14
15
  "./array": {
16
+ "types": "./dist/array/index.d.ts",
15
17
  "import": "./esm/array/index.mjs",
16
18
  "require": "./dist/array/index.js"
17
19
  },
18
20
  "./function": {
21
+ "types": "./dist/function/index.d.ts",
19
22
  "import": "./esm/function/index.mjs",
20
23
  "require": "./dist/function/index.js"
21
24
  },
22
25
  "./math": {
26
+ "types": "./dist/math/index.d.ts",
23
27
  "import": "./esm/math/index.mjs",
24
28
  "require": "./dist/math/index.js"
25
29
  },
26
30
  "./object": {
31
+ "types": "./dist/object/index.d.ts",
27
32
  "import": "./esm/object/index.mjs",
28
33
  "require": "./dist/object/index.js"
29
34
  },
30
35
  "./predicate": {
36
+ "types": "./dist/predicate/index.d.ts",
31
37
  "import": "./esm/predicate/index.mjs",
32
38
  "require": "./dist/predicate/index.js"
33
39
  },
34
40
  "./promise": {
41
+ "types": "./dist/promise/index.d.ts",
35
42
  "import": "./esm/promise/index.mjs",
36
43
  "require": "./dist/promise/index.js"
37
44
  },
@@ -39,36 +46,46 @@
39
46
  },
40
47
  "files": [
41
48
  "dist/**/*",
42
- "esm/**/*"
49
+ "esm/**/*",
50
+ "*.d.ts"
43
51
  ],
44
52
  "publishConfig": {
45
53
  "access": "public",
54
+ "main": "./dist/index.js",
55
+ "types": "./dist/index.d.ts",
46
56
  "exports": {
47
57
  ".": {
58
+ "types": "./dist/index.d.ts",
48
59
  "import": "./esm/index.mjs",
49
60
  "require": "./dist/index.js"
50
61
  },
51
62
  "./array": {
63
+ "types": "./dist/array/index.d.ts",
52
64
  "import": "./esm/array/index.mjs",
53
65
  "require": "./dist/array/index.js"
54
66
  },
55
67
  "./function": {
68
+ "types": "./dist/function/index.d.ts",
56
69
  "import": "./esm/function/index.mjs",
57
70
  "require": "./dist/function/index.js"
58
71
  },
59
72
  "./math": {
73
+ "types": "./dist/math/index.d.ts",
60
74
  "import": "./esm/math/index.mjs",
61
75
  "require": "./dist/math/index.js"
62
76
  },
63
77
  "./object": {
78
+ "types": "./dist/object/index.d.ts",
64
79
  "import": "./esm/object/index.mjs",
65
80
  "require": "./dist/object/index.js"
66
81
  },
67
82
  "./predicate": {
83
+ "types": "./dist/predicate/index.d.ts",
68
84
  "import": "./esm/predicate/index.mjs",
69
85
  "require": "./dist/predicate/index.js"
70
86
  },
71
87
  "./promise": {
88
+ "types": "./dist/promise/index.d.ts",
72
89
  "import": "./esm/promise/index.mjs",
73
90
  "require": "./dist/promise/index.js"
74
91
  },
@@ -102,7 +119,9 @@
102
119
  "sideEffects": false,
103
120
  "scripts": {
104
121
  "prepack": "yarn build",
105
- "build": "rm -rf dist esm && tsc -p tsconfig.json --declaration --emitDeclarationOnly --declarationDir dist && rollup -c rollup.config.js",
122
+ "build": "rm -rf dist esm && tsc -p tsconfig.json --declaration --emitDeclarationOnly --declarationDir dist && rollup -c rollup.config.js && ./.scripts/postbuild.sh",
106
123
  "test": "vitest run --coverage --typecheck"
107
- }
124
+ },
125
+ "main": "./dist/index.js",
126
+ "types": "./dist/index.d.ts"
108
127
  }
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';