es-toolkit 1.20.0-dev.648 → 1.20.0-dev.649

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.
@@ -48,18 +48,17 @@ declare function curry<P1, P2, R>(func: (p1: P1, p2: P2) => R): (p1: P1) => (p2:
48
48
  * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.
49
49
  * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.
50
50
  *
51
- * @param {(p1: P1, p2: P2, p3: P3, p4: P4) => R} func - The function to curry.
52
- * @returns {(p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => R} A curried function.
51
+ * @param {(p1: P1, p2: P2, p3: P3) => R} func - The function to curry.
52
+ * @returns {(p1: P1) => (p2: P2) => (p3: P3) => R} A curried function.
53
53
  *
54
54
  * @example
55
- * function fourArgFunc(a: number, b: number, c: number, d: number) {
56
- * return a + b + c + d;
55
+ * function threeArgFunc(a: number, b: number, c: number) {
56
+ * return a + b + c;
57
57
  * }
58
- * const curriedFourArgFunc = curry(fourArgFunc);
59
- * const add1 = curriedFourArgFunc(1);
60
- * const add2 = add1(2);
61
- * const add3 = add2(3);
62
- * console.log(add3(4)); // 10
58
+ * const curriedThreeArgFunc = curry(threeArgFunc);
59
+ * const add1 = curriedThreeArgFunc(1);
60
+ * const add3 = add1(2);
61
+ * console.log(add3(3)); // 6
63
62
  */
64
63
  declare function curry<P1, P2, P3, R>(func: (p1: P1, p2: P2, p3: P3) => R): (p1: P1) => (p2: P2) => (p3: P3) => R;
65
64
  /**
@@ -75,9 +74,9 @@ declare function curry<P1, P2, P3, R>(func: (p1: P1, p2: P2, p3: P3) => R): (p1:
75
74
  * }
76
75
  * const curriedFourArgFunc = curry(fourArgFunc);
77
76
  * const add1 = curriedFourArgFunc(1);
78
- * const add2 = add1(2);
79
- * const add3 = add2(3);
80
- * console.log(add3(4)); // 10
77
+ * const add3 = add1(2);
78
+ * const add6 = add3(3);
79
+ * console.log(add6(4)); // 10
81
80
  */
82
81
  declare function curry<P1, P2, P3, P4, R>(func: (p1: P1, p2: P2, p3: P3, p4: P4) => R): (p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => R;
83
82
  /**
@@ -93,10 +92,10 @@ declare function curry<P1, P2, P3, P4, R>(func: (p1: P1, p2: P2, p3: P3, p4: P4)
93
92
  * }
94
93
  * const curriedFiveArgFunc = curry(fiveArgFunc);
95
94
  * const add1 = curriedFiveArgFunc(1);
96
- * const add2 = add1(2);
97
- * const add3 = add2(3);
98
- * const add4 = add3(4);
99
- * console.log(add4(5)); // 15
95
+ * const add3 = add1(2);
96
+ * const add6 = add3(3);
97
+ * const add10 = add6(4);
98
+ * console.log(add10(5)); // 15
100
99
  */
101
100
  declare function curry<P1, P2, P3, P4, P5, R>(func: (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => R): (p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => (p5: P5) => R;
102
101
  /**
@@ -114,13 +113,13 @@ declare function curry<P1, P2, P3, P4, P5, R>(func: (p1: P1, p2: P2, p3: P3, p4:
114
113
  * const curriedSum = curry(sum);
115
114
  *
116
115
  * // The parameter `a` should be given the value `10`.
117
- * const sum10 = curriedSum(10);
116
+ * const add10 = curriedSum(10);
118
117
  *
119
118
  * // The parameter `b` should be given the value `15`.
120
- * const sum25 = sum10(15);
119
+ * const add25 = add10(15);
121
120
  *
122
121
  * // The parameter `c` should be given the value `5`. The function 'sum' has received all its arguments and will now return a value.
123
- * const result = sum25(5);
122
+ * const result = add25(5);
124
123
  */
125
124
  declare function curry(func: (...args: any[]) => any): (...args: any[]) => any;
126
125
 
@@ -48,18 +48,17 @@ declare function curry<P1, P2, R>(func: (p1: P1, p2: P2) => R): (p1: P1) => (p2:
48
48
  * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.
49
49
  * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.
50
50
  *
51
- * @param {(p1: P1, p2: P2, p3: P3, p4: P4) => R} func - The function to curry.
52
- * @returns {(p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => R} A curried function.
51
+ * @param {(p1: P1, p2: P2, p3: P3) => R} func - The function to curry.
52
+ * @returns {(p1: P1) => (p2: P2) => (p3: P3) => R} A curried function.
53
53
  *
54
54
  * @example
55
- * function fourArgFunc(a: number, b: number, c: number, d: number) {
56
- * return a + b + c + d;
55
+ * function threeArgFunc(a: number, b: number, c: number) {
56
+ * return a + b + c;
57
57
  * }
58
- * const curriedFourArgFunc = curry(fourArgFunc);
59
- * const add1 = curriedFourArgFunc(1);
60
- * const add2 = add1(2);
61
- * const add3 = add2(3);
62
- * console.log(add3(4)); // 10
58
+ * const curriedThreeArgFunc = curry(threeArgFunc);
59
+ * const add1 = curriedThreeArgFunc(1);
60
+ * const add3 = add1(2);
61
+ * console.log(add3(3)); // 6
63
62
  */
64
63
  declare function curry<P1, P2, P3, R>(func: (p1: P1, p2: P2, p3: P3) => R): (p1: P1) => (p2: P2) => (p3: P3) => R;
65
64
  /**
@@ -75,9 +74,9 @@ declare function curry<P1, P2, P3, R>(func: (p1: P1, p2: P2, p3: P3) => R): (p1:
75
74
  * }
76
75
  * const curriedFourArgFunc = curry(fourArgFunc);
77
76
  * const add1 = curriedFourArgFunc(1);
78
- * const add2 = add1(2);
79
- * const add3 = add2(3);
80
- * console.log(add3(4)); // 10
77
+ * const add3 = add1(2);
78
+ * const add6 = add3(3);
79
+ * console.log(add6(4)); // 10
81
80
  */
82
81
  declare function curry<P1, P2, P3, P4, R>(func: (p1: P1, p2: P2, p3: P3, p4: P4) => R): (p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => R;
83
82
  /**
@@ -93,10 +92,10 @@ declare function curry<P1, P2, P3, P4, R>(func: (p1: P1, p2: P2, p3: P3, p4: P4)
93
92
  * }
94
93
  * const curriedFiveArgFunc = curry(fiveArgFunc);
95
94
  * const add1 = curriedFiveArgFunc(1);
96
- * const add2 = add1(2);
97
- * const add3 = add2(3);
98
- * const add4 = add3(4);
99
- * console.log(add4(5)); // 15
95
+ * const add3 = add1(2);
96
+ * const add6 = add3(3);
97
+ * const add10 = add6(4);
98
+ * console.log(add10(5)); // 15
100
99
  */
101
100
  declare function curry<P1, P2, P3, P4, P5, R>(func: (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => R): (p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => (p5: P5) => R;
102
101
  /**
@@ -114,13 +113,13 @@ declare function curry<P1, P2, P3, P4, P5, R>(func: (p1: P1, p2: P2, p3: P3, p4:
114
113
  * const curriedSum = curry(sum);
115
114
  *
116
115
  * // The parameter `a` should be given the value `10`.
117
- * const sum10 = curriedSum(10);
116
+ * const add10 = curriedSum(10);
118
117
  *
119
118
  * // The parameter `b` should be given the value `15`.
120
- * const sum25 = sum10(15);
119
+ * const add25 = add10(15);
121
120
  *
122
121
  * // The parameter `c` should be given the value `5`. The function 'sum' has received all its arguments and will now return a value.
123
- * const result = sum25(5);
122
+ * const result = add25(5);
124
123
  */
125
124
  declare function curry(func: (...args: any[]) => any): (...args: any[]) => any;
126
125
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
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.20.0-dev.648+60e4ba38",
4
+ "version": "1.20.0-dev.649+c9346d50",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {