es-toolkit 1.49.0-dev.1915 → 1.49.0-dev.1916
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/fp/pipe.js +8 -12
- package/dist/fp/pipe.mjs +8 -12
- package/package.json +1 -1
package/dist/fp/pipe.js
CHANGED
|
@@ -54,22 +54,18 @@ function pipe(value, ...functions) {
|
|
|
54
54
|
return output;
|
|
55
55
|
}
|
|
56
56
|
function chunkFunctions(functions) {
|
|
57
|
-
|
|
58
|
-
let currentGroup
|
|
59
|
-
|
|
60
|
-
let previousIsLazy = currentGroup[0].lazy != null;
|
|
61
|
-
if (previousIsLazy) currentGroup.lazy = true;
|
|
62
|
-
if (currentGroup[0].shortCircuit) currentGroup.shortCircuit = true;
|
|
63
|
-
for (let index = 1; index < functions.length; index++) {
|
|
57
|
+
const result = [];
|
|
58
|
+
let currentGroup;
|
|
59
|
+
for (let index = 0; index < functions.length; index++) {
|
|
64
60
|
const func = functions[index];
|
|
65
61
|
const isLazy = func.lazy != null;
|
|
66
|
-
if (
|
|
67
|
-
currentGroup = [
|
|
62
|
+
if (currentGroup === void 0 || currentGroup.lazy !== isLazy) {
|
|
63
|
+
currentGroup = [];
|
|
64
|
+
currentGroup.lazy = isLazy;
|
|
68
65
|
result.push(currentGroup);
|
|
69
|
-
}
|
|
70
|
-
|
|
66
|
+
}
|
|
67
|
+
currentGroup.push(func);
|
|
71
68
|
if (func.shortCircuit) currentGroup.shortCircuit = true;
|
|
72
|
-
previousIsLazy = isLazy;
|
|
73
69
|
}
|
|
74
70
|
return result;
|
|
75
71
|
}
|
package/dist/fp/pipe.mjs
CHANGED
|
@@ -54,22 +54,18 @@ function pipe(value, ...functions) {
|
|
|
54
54
|
return output;
|
|
55
55
|
}
|
|
56
56
|
function chunkFunctions(functions) {
|
|
57
|
-
|
|
58
|
-
let currentGroup
|
|
59
|
-
|
|
60
|
-
let previousIsLazy = currentGroup[0].lazy != null;
|
|
61
|
-
if (previousIsLazy) currentGroup.lazy = true;
|
|
62
|
-
if (currentGroup[0].shortCircuit) currentGroup.shortCircuit = true;
|
|
63
|
-
for (let index = 1; index < functions.length; index++) {
|
|
57
|
+
const result = [];
|
|
58
|
+
let currentGroup;
|
|
59
|
+
for (let index = 0; index < functions.length; index++) {
|
|
64
60
|
const func = functions[index];
|
|
65
61
|
const isLazy = func.lazy != null;
|
|
66
|
-
if (
|
|
67
|
-
currentGroup = [
|
|
62
|
+
if (currentGroup === void 0 || currentGroup.lazy !== isLazy) {
|
|
63
|
+
currentGroup = [];
|
|
64
|
+
currentGroup.lazy = isLazy;
|
|
68
65
|
result.push(currentGroup);
|
|
69
|
-
}
|
|
70
|
-
|
|
66
|
+
}
|
|
67
|
+
currentGroup.push(func);
|
|
71
68
|
if (func.shortCircuit) currentGroup.shortCircuit = true;
|
|
72
|
-
previousIsLazy = isLazy;
|
|
73
69
|
}
|
|
74
70
|
return result;
|
|
75
71
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
|
-
"version": "1.49.0-dev.
|
|
3
|
+
"version": "1.49.0-dev.1916+d40cc87f",
|
|
4
4
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
5
5
|
"homepage": "https://es-toolkit.dev",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|