@delofarag/base-utils 1.0.1 → 1.1.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/README.md CHANGED
@@ -26,3 +26,4 @@ console.log(`Hello, ${answer}!`)
26
26
  - Stack log utilities
27
27
 
28
28
 
29
+
package/dist/index.d.ts CHANGED
@@ -2,4 +2,6 @@ export { input } from "./cli";
2
2
  export * from "./file-utils";
3
3
  export * from "./pino-logger";
4
4
  export * from "./stackLog";
5
+ export * from "./pipe";
6
+ export * from "./types";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -2,4 +2,6 @@ export { input } from "./cli";
2
2
  export * from "./file-utils";
3
3
  export * from "./pino-logger";
4
4
  export * from "./stackLog";
5
+ export * from "./pipe";
6
+ export * from "./types";
5
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA"}
package/dist/pipe.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export default class pipe {
2
+ private static instance;
3
+ private value;
4
+ private constructor();
5
+ static start(fn: () => any): pipe;
6
+ then(fn: (value: any) => any): pipe;
7
+ return(fn: (value: any) => any): any;
8
+ }
9
+ //# sourceMappingURL=pipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../src/pipe.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAqB;IAC5C,OAAO,CAAC,KAAK,CAAa;IAE1B,OAAO;IAEP,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,IAAI;IASjC,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,GAAG,IAAI;IAKnC,MAAM,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG;CAK/B"}
package/dist/pipe.js ADDED
@@ -0,0 +1,23 @@
1
+ export default class pipe {
2
+ static instance = null;
3
+ value = null;
4
+ constructor() { }
5
+ static start(fn) {
6
+ if (!pipe.instance) {
7
+ pipe.instance = new pipe();
8
+ }
9
+ pipe.instance.value = null;
10
+ pipe.instance.value = fn();
11
+ return pipe.instance;
12
+ }
13
+ then(fn) {
14
+ this.value = fn(this.value);
15
+ return this;
16
+ }
17
+ return(fn) {
18
+ const result = fn(this.value);
19
+ this.value = null;
20
+ return result;
21
+ }
22
+ }
23
+ //# sourceMappingURL=pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipe.js","sourceRoot":"","sources":["../src/pipe.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,IAAI;IACf,MAAM,CAAC,QAAQ,GAAgB,IAAI,CAAC;IACpC,KAAK,GAAQ,IAAI,CAAC;IAE1B,gBAAuB,CAAC;IAExB,MAAM,CAAC,KAAK,CAAC,EAAa;QACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,CAAC,EAAuB;QAC1B,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,EAAuB;QAC5B,MAAM,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,OAAO,MAAM,CAAC;IAChB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type Prettify<T> = {
2
+ [K in keyof T]: T[K];
3
+ } & {};
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,GAAG,EAAE,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delofarag/base-utils",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",