@zwa73/utils 1.0.115 → 1.0.116
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/package.json +2 -2
- package/scripts/postinstall.js +1 -1
- package/src/UtilFP.macro.ts +5 -5
- package/tsconfig.compile.json +2 -1
- package/dist/UtilFP.macro.d.ts +0 -1
- package/dist/UtilFP.macro.js +0 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zwa73/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.116",
|
|
4
4
|
"description": "my utils",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@types/fluent-ffmpeg": "^2.1.21",
|
|
34
34
|
"@types/jest": "^29.5.12",
|
|
35
35
|
"@types/node": "^18.16.3",
|
|
36
|
-
"@zwa73/dev-utils": "^1.0.
|
|
36
|
+
"@zwa73/dev-utils": "^1.0.37",
|
|
37
37
|
"jest": "^29.7.0",
|
|
38
38
|
"ts-jest": "^29.1.2",
|
|
39
39
|
"tsc-alias": "^1.8.8",
|
package/scripts/postinstall.js
CHANGED
package/src/UtilFP.macro.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {regionMacro} from '@zwa73/dev-utils';
|
|
2
2
|
|
|
3
3
|
const N = 20;
|
|
4
4
|
const R = (n:number)=>n===0?`I`:`R${n}`;
|
|
5
5
|
const prefix = (str:string,prefix?:string)=> str.length>0?`${prefix}${str}`:str;
|
|
6
6
|
const suffix = (str:string,suffix?:string)=> str.length>0?`${str}${suffix}`:str;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
regionMacro("flow重载",()=>{
|
|
9
9
|
let result = ``;
|
|
10
10
|
for (let i = 0; i <= N; i++) {
|
|
11
11
|
const template = Array.from({length: i+1}, (_, k) => R(k)).join(', ');
|
|
@@ -15,8 +15,8 @@ $macro("flow重载",(()=>{
|
|
|
15
15
|
result += `export function flow<${template}>(${args}...fs: CompFunc<${R(i)}, ${R(i)}>[]): CompFunc<I, ${R(i)}>;\n`;
|
|
16
16
|
}
|
|
17
17
|
return result.trim();
|
|
18
|
-
})
|
|
19
|
-
|
|
18
|
+
});
|
|
19
|
+
regionMacro("pipe重载",()=>{
|
|
20
20
|
let result = ``;
|
|
21
21
|
for (let i = 0; i <= N; i++) {
|
|
22
22
|
const template = Array.from({length: i+1}, (_, k) => R(k)).join(', ');
|
|
@@ -26,4 +26,4 @@ $macro("pipe重载",(()=>{
|
|
|
26
26
|
result += `export function pipe<${template}>(input: I, ${args}...fs: CompFunc<${R(i)}, ${R(i)}>[]): ${R(i)};\n`;
|
|
27
27
|
}
|
|
28
28
|
return result.trim();
|
|
29
|
-
})
|
|
29
|
+
});
|
package/tsconfig.compile.json
CHANGED
package/dist/UtilFP.macro.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/UtilFP.macro.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dev_utils_1 = require("@zwa73/dev-utils");
|
|
4
|
-
const N = 20;
|
|
5
|
-
const R = (n) => n === 0 ? `I` : `R${n}`;
|
|
6
|
-
const prefix = (str, prefix) => str.length > 0 ? `${prefix}${str}` : str;
|
|
7
|
-
const suffix = (str, suffix) => str.length > 0 ? `${str}${suffix}` : str;
|
|
8
|
-
(0, dev_utils_1.$macro)("flow重载", (() => {
|
|
9
|
-
let result = ``;
|
|
10
|
-
for (let i = 0; i <= N; i++) {
|
|
11
|
-
const template = Array.from({ length: i + 1 }, (_, k) => R(k)).join(', ');
|
|
12
|
-
const args = suffix(Array.from({ length: i }, (_, k) => `f${k + 1}: CompFunc<${R(k)}, ${R(k + 1)}>`).join(', '), ", ");
|
|
13
|
-
result += `export function flow<${template}>(${args}...fs: CompFunc<${R(i)}, ${R(i)}>[]): CompFunc<I, ${R(i)}>;\n`;
|
|
14
|
-
}
|
|
15
|
-
return result.trim();
|
|
16
|
-
})());
|
|
17
|
-
(0, dev_utils_1.$macro)("pipe重载", (() => {
|
|
18
|
-
let result = ``;
|
|
19
|
-
for (let i = 0; i <= N; i++) {
|
|
20
|
-
const template = Array.from({ length: i + 1 }, (_, k) => R(k)).join(', ');
|
|
21
|
-
const args = suffix(Array.from({ length: i }, (_, k) => `f${k + 1}: CompFunc<${R(k)}, ${R(k + 1)}>`).join(', '), ", ");
|
|
22
|
-
result += `export function pipe<${template}>(input: I, ${args}...fs: CompFunc<${R(i)}, ${R(i)}>[]): ${R(i)};\n`;
|
|
23
|
-
}
|
|
24
|
-
return result.trim();
|
|
25
|
-
})());
|