@e280/stz 0.1.2 → 0.1.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e280/stz",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "everyday ts fns for everything",
5
5
  "license": "MIT",
6
6
  "author": "Chase Moskal <chasemoskal@gmail.com>",
package/s/pipe.ts CHANGED
@@ -20,5 +20,11 @@ export class Pipe<I> {
20
20
  done() {
21
21
  return this.#input
22
22
  }
23
+
24
+ line(...fns: Piper<I, I>[]) {
25
+ let x = this.#input
26
+ for (const fn of fns) x = fn(x)
27
+ return x
28
+ }
23
29
  }
24
30
 
package/x/pipe.d.ts CHANGED
@@ -6,4 +6,5 @@ export declare class Pipe<I> {
6
6
  constructor(input: I);
7
7
  to<O>(fn: Piper<I, O>): Pipe<O>;
8
8
  done(): I;
9
+ line(...fns: Piper<I, I>[]): I;
9
10
  }
package/x/pipe.js CHANGED
@@ -13,5 +13,11 @@ export class Pipe {
13
13
  done() {
14
14
  return this.#input;
15
15
  }
16
+ line(...fns) {
17
+ let x = this.#input;
18
+ for (const fn of fns)
19
+ x = fn(x);
20
+ return x;
21
+ }
16
22
  }
17
23
  //# sourceMappingURL=pipe.js.map
package/x/pipe.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pipe.js","sourceRoot":"","sources":["../s/pipe.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,IAAI,CAAI,KAAQ;IAC/B,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;AACvB,CAAC;AAED,MAAM,OAAO,IAAI;IAChB,MAAM,CAAG;IACT,MAAM,CAAC,IAAI,GAAG,IAAI,CAAA;IAElB,YAAY,KAAQ;QACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,EAAE,CAAI,EAAe;QACpB,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,CAAC;IAED,IAAI;QACH,OAAO,IAAI,CAAC,MAAM,CAAA;IACnB,CAAC"}
1
+ {"version":3,"file":"pipe.js","sourceRoot":"","sources":["../s/pipe.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,IAAI,CAAI,KAAQ;IAC/B,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;AACvB,CAAC;AAED,MAAM,OAAO,IAAI;IAChB,MAAM,CAAG;IACT,MAAM,CAAC,IAAI,GAAG,IAAI,CAAA;IAElB,YAAY,KAAQ;QACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,EAAE,CAAI,EAAe;QACpB,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,CAAC;IAED,IAAI;QACH,OAAO,IAAI,CAAC,MAAM,CAAA;IACnB,CAAC;IAED,IAAI,CAAC,GAAG,GAAkB;QACzB,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAA;QACnB,KAAK,MAAM,EAAE,IAAI,GAAG;YAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;QAC/B,OAAO,CAAC,CAAA;IACT,CAAC"}