ppipe 2.6.6 → 3.0.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/LICENSE CHANGED
@@ -1,13 +1,13 @@
1
- Copyright 2020 Yavuz Ege Özcan
2
-
3
- Permission to use, copy, modify, and/or distribute this software for any purpose
4
- with or without fee is hereby granted, provided that the above copyright notice
5
- and this permission notice appear in all copies.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
9
- FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
10
- OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
11
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
12
- ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
13
- SOFTWARE.
1
+ Copyright 2020 Yavuz Ege Özcan
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any purpose
4
+ with or without fee is hereby granted, provided that the above copyright notice
5
+ and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
9
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
10
+ OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
11
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
12
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
13
+ SOFTWARE.
package/README.md CHANGED
@@ -1,329 +1,273 @@
1
- # [![PPIPE](logo/logo_s.png)](https://github.com/egeozcan/ppipe)
2
-
3
- [![build](https://travis-ci.org/egeozcan/ppipe.svg?branch=master)](https://travis-ci.org/egeozcan/ppipe)
4
- [![Coverage Status](https://coveralls.io/repos/github/egeozcan/ppipe/badge.svg?branch=master)](https://coveralls.io/github/egeozcan/ppipe?branch=master)
5
- [![npm](https://img.shields.io/npm/v/ppipe.svg)](https://www.npmjs.com/package/ppipe)
6
- [![npm](https://img.shields.io/npm/dt/ppipe.svg)](https://www.npmjs.com/package/ppipe)
7
- [![license](https://img.shields.io/github/license/egeozcan/ppipe.svg)](https://github.com/egeozcan/ppipe/blob/master/LICENSE)
8
- [![DeepScan Grade](https://deepscan.io/api/projects/565/branches/916/badge/grade.svg)](https://deepscan.io/dashboard/#view=project&pid=565&bid=916)
9
-
10
- _Please note that this library is considered "done". It is still maintained and will be in the foreseeable future, but,
11
- other than adding Typescript support, no new functionality will be added. At least, there is no plan to do so.
12
- This library has an extensive test suite with 100% coverage, and it is used by at least a few well-established
13
- projects in production. The mythical "production-ready" seems to be reached :)_
14
-
15
- _All bug reports and suggestions are still welcome!_
16
-
17
- **pipes values through functions**, an alternative to using the
18
- [proposed pipe operator](https://github.com/mindeavor/es-pipeline-operator) ( |>
19
- ) for ES.
20
-
21
- [Demo available on RunKit](https://runkit.com/egeozcan/ppipe).
22
-
23
- Supports functions returning promises too. In that case, the result of the chain
24
- will also be a promise. This is similar to the proposed support for await in the
25
- chained functions.
26
-
27
- ## Installation
28
-
29
- `npm install ppipe`
30
-
31
- ## Problems ppipe solves
32
-
33
- Let's assume you have these functions:
34
-
35
- ```javascript
36
- const add = (x, y) => x + y;
37
- const square = x => x * x;
38
- const divide = (x, y) => x / y;
39
- const double = x => x + x;
40
- ```
41
-
42
- How do you pass the results from one to another?
43
-
44
- ```javascript
45
- //good old single line solution
46
- add(divide(square(double(add(1, 1))), 8), 1);
47
- //try to get creative with variable names?
48
- const incremented = add(1, 1);
49
- const doubled = double(incremented);
50
- //...
51
- ```
52
-
53
- An ideal solution would have been having a pipe operator (|>) but we don't have
54
- it. Here is where ppipe comes in.
55
-
56
- _Order of arguments can be manipulated using the \_ property of ppipe function.
57
- The result of the previous function is inserted to its place if it exists in the
58
- arguments. It can also occur more than once if you want to pass the same
59
- parameter more than once. If, and only if, \_ doesn't exist among the arguments,
60
- the piped value will be inserted at the end._
61
-
62
- ```javascript
63
- const ppipe = require("ppipe");
64
- const _ = ppipe._;
65
- ppipe(1)(add, 1)(double)(square)(divide, _, 8)(add, 1)(); // 3
66
- ```
67
-
68
- If that is too lisp-y, you can also use ".pipe".
69
-
70
- ```javascript
71
- ppipe(1)
72
- .pipe(add, 1)
73
- .pipe(double)
74
- .pipe(square)
75
- .pipe(divide, _, 8)
76
- .pipe(add, 1)(); // 3
77
- ```
78
-
79
- And then you receive some new "requirements", which end up making the "double"
80
- function async...
81
-
82
- ```javascript
83
- async function asyncDouble(x) {
84
- const result = x * 2;
85
- await someAPICall(result);
86
- return result;
87
- }
88
- ```
89
-
90
- Here are the changes you need to make:
91
-
92
- ```javascript
93
- await ppipe(1)
94
- .pipe(add, 1)
95
- .pipe(asyncDouble)
96
- .pipe(square)
97
- .pipe(divide, _, 8)
98
- .pipe(add, 1); //3 (you can also use .then and .catch)
99
- ```
100
-
101
- Yes, ppipe automatically turns the end result into a promise, if one or more
102
- functions in the chain return a promise. It also waits for the resolution and
103
- passes the unwrapped value to the next function. You can also catch the errors
104
- with `.catch` like a standard promise or use try/catch in an async function. You
105
- meet the requirements and keep the code tidy.
106
-
107
- For consistency, the `.then` and `.catch` methods are always available, so you
108
- don't have to care if any function in the chain is async as long as you use
109
- those.
110
-
111
- So, later you receive some new "requirements", which make our now infamous
112
- double function return an object:
113
-
114
- ```javascript
115
- async function asyncComplexDouble(x) {
116
- const result = x * 2;
117
- const someInfo = await someAPICall(result);
118
- return { result, someInfo };
119
- }
120
- ```
121
-
122
- Still not a problem:
123
-
124
- ```javascript
125
- await ppipe(1)
126
- .pipe(add, 1)
127
- .pipe(asyncComplexDouble)
128
- //pipe._ is also a proxy which saves the property accesses to pluck the prop from the
129
- //previous function's result later
130
- .pipe(square, _.result)
131
- .pipe(divide, _, 8)
132
- .pipe(add, 1); //3
133
-
134
- //well, if you think that might not be clear, you can write it like this, too
135
- await ppipe(1)
136
- .pipe(add, 1)
137
- .pipe(asyncComplexDouble)
138
- .pipe(x => x.result)
139
- .pipe(square)
140
- .pipe(divide, _, 8)
141
- .pipe(add, 1); //3
142
-
143
- //this also works
144
- await ppipe(1)
145
- .pipe(add, 1)
146
- .pipe(asyncComplexDouble)
147
- //promises will be unboxed and properties will be returned as getter functions
148
- //the methods will be available in the chain as well, as shown in the next example
149
- .result()
150
- .pipe(square)
151
- .pipe(divide, _, 8)
152
- .pipe(add, 1); //3
153
- ```
154
-
155
- Let's go one step further; what if you need to access a method from the result?
156
-
157
- ```javascript
158
- async function advancedDouble(x) {
159
- const result = x * 2;
160
- const someInfo = await someAPICall(result);
161
- return {
162
- getResult() {
163
- return result;
164
- },
165
- someInfo
166
- };
167
- }
168
- ```
169
-
170
- There you go:
171
-
172
- ```javascript
173
- await ppipe(1)
174
- .pipe(add, 1)
175
- .pipe(advancedDouble)
176
- .getResult()
177
- .pipe(square)
178
- .pipe(divide, _, 8)
179
- .pipe(add, 1); //3
180
- ```
181
-
182
- ## Some More Examples
183
-
184
- It is possible to expand the iterable result
185
-
186
- ```javascript
187
- const addAll = (...x) => x.reduce((a, b) => a + b, 0)
188
- ppipe([1,2,3]).map(x => x + 1).pipe(addAll, ..._)(); //9
189
- ```
190
-
191
- It is possible to reach array members:
192
-
193
- ```javascript
194
- await ppipe(10)
195
- .pipe(asyncComplexDoubleArray)
196
- .pipe((x, y) => x + y, _[1], _[2]);
197
- ```
198
-
199
- Also object properties:
200
-
201
- ```javascript
202
- ppipe(10)
203
- .pipe(x => ({multipliers: [10,20], value: x}))
204
- .pipe((x, y) => x * y, _.multipliers[0], _.value)(); //100
205
- ```
206
-
207
- And you can omit the function altogether if you just want to extract values:
208
-
209
- ```javascript
210
- ppipe({multipliers: [10,20], value: 10}).pipe(_.value)(); //10
211
- await ppipe({multipliers: [10,20], value: 10}).pipe(_.value); //10
212
- ```
213
-
214
- And as you've seen before, you can always omit the ".pipe", as long as you
215
- know how to keep ASI in check:
216
-
217
- ```javascript
218
- ppipe({multipliers: [10,20], value: 10})(_.value)(); //10
219
- await ppipe({multipliers: [10,20], value: 10})(_.value); //10
220
- ```
221
-
222
- ## Advanced Functionality
223
-
224
- ### Chain Methods / Properties
225
-
226
- You can use these from the chain (after creating one with `ppipe(val)`).
227
-
228
- #### .with(ctx)
229
-
230
- Calls the following function in chain with the given `this` value (ctx). After
231
- calling `.with` the chain can be continued with the methods from the ctx.
232
-
233
- ```javascript
234
- class Example {
235
- constructor(myInt) {
236
- this.foo = Promise.resolve(myInt);
237
- }
238
- addToFoo(x) {
239
- return this.foo.then(foo => foo + x);
240
- }
241
- }
242
- await ppipe(10).with(new Example(5)).addToFoo(_); //15
243
- ```
244
-
245
- Look at the test/test.js for more examples.
246
-
247
- #### .val
248
-
249
- Gets the current value from the chain. Will be a promise if any function in the
250
- chain returns a promise. Calling the chain with no parameters achieves the same
251
- result.
252
-
253
- ### Extending Ppipe
254
-
255
- You can create an extended instance of ppipe via `.extend`.
256
-
257
- ```javascript
258
- const newPipe = ppipe.extend({
259
- divide (x, y) {
260
- return x / y;
261
- },
262
- log(...params) {
263
- console.log(...params);
264
- return params[params.length - 1];
265
- }
266
- });
267
- const res = await newPipe(10)
268
- .pipe(x => x + 1)
269
- .divide(_, 11)
270
- .log("here is our x: ") //logs "here is our x: 1"
271
- .pipe(x => x + 1) // 2
272
- ```
273
-
274
- You can also call `.extend` on the extended ppipes. It will create a new ppipe
275
- with the new and existing extensions merged.
276
-
277
- ## Testing
278
-
279
- All the functionality is tested, with 100% coverage. This is also integrated in the build process.
280
-
281
- To run the tests yourself, clone the repository, install the dev dependencies, and run the npm test command.
282
-
283
- `npm install`
284
-
285
- `npm test`
286
-
287
- ## Contributing
288
-
289
- See
290
- [CONTRIBUTING](https://github.com/egeozcan/ppipe/blob/master/.github/CONTRIBUTING.md).
291
-
292
- ## Changelog
293
-
294
- * v2.5.0 - placeholder can be the only argument to the .pipe, for just extracting a property or path
295
- * v2.4.0 - allow deep property extraction via the placeholder
296
- (\_.deeply.nested.prop) (test: should be able to extract array members)
297
- * v2.3.0 - now supports expanding the placeholder (...\_) (test: should support
298
- expanding the array result)
299
-
300
- ## Caveats
301
-
302
- * This library was not written with performance in mind. So, it makes next to no
303
- sense to use it in, say, a tight loop. Use in a web-server should be fine as
304
- long as you don't have tight response-time requirements. General rule of
305
- thumb: Test it before putting it into prod. There are a lot of tests written
306
- for ppipe but none of them measure performance. I may improve the performance
307
- in the future (some low-hanging fruits) but I'd rather avoid making any
308
- guarantees. Well, there is one good news:
309
- [Chrome team is working on performance improvements to the Proxy](https://v8project.blogspot.de/2017/10/optimizing-proxies.html)
310
- which will very positively affect ppipe performance.
311
-
312
- * It uses ES6 Proxies to do its magic. Proxies are not back-portable. 1.x.x
313
- versions of ppipe didn't use proxies. So you can try using an older version
314
- with a transpiler if evergreen sounds alien to you.
315
- [Here](https://github.com/egeozcan/ppipe/blob/1888e9269be90f549d5c00002f7e800598c6d539/index.js)
316
- is an older stable version without value extracting and context change
317
- support.
318
-
319
- * ppipe is not typed. No type definition exists for TypeScript nor Flow. I
320
- actually love TypeScript and would support it but the lack of variadic generic
321
- type parameters make it next to impossible to provide type definitions for
322
- ppipe. More can be read
323
- [here](https://github.com/Microsoft/TypeScript/issues/5453). Also, ppipe is as
324
- dynamic as it gets, giving the ability to access virtual properties/methods
325
- which may belong to the provided context, the processed value or any of the
326
- possible extensions.
327
- [TypeScripts Type System is Turing Complete](https://github.com/Microsoft/TypeScript/issues/14833),
328
- so, maybe there is a way to type all of this but I really need help about
329
- that.
1
+ # [![PPIPE](logo/logo_s.png)](https://github.com/egeozcan/ppipe)
2
+
3
+ [![build](https://travis-ci.org/egeozcan/ppipe.svg?branch=master)](https://travis-ci.org/egeozcan/ppipe)
4
+ [![Coverage Status](https://coveralls.io/repos/github/egeozcan/ppipe/badge.svg?branch=master)](https://coveralls.io/github/egeozcan/ppipe?branch=master)
5
+ [![npm](https://img.shields.io/npm/v/ppipe.svg)](https://www.npmjs.com/package/ppipe)
6
+ [![npm](https://img.shields.io/npm/dt/ppipe.svg)](https://www.npmjs.com/package/ppipe)
7
+ [![license](https://img.shields.io/github/license/egeozcan/ppipe.svg)](https://github.com/egeozcan/ppipe/blob/master/LICENSE)
8
+
9
+ **Strictly-typed pipes for values through functions**, an alternative to using the
10
+ [proposed pipe operator](https://github.com/tc39/proposal-pipeline-operator) ( |> ) for ES.
11
+
12
+ Version 3.0 is a complete TypeScript rewrite with **maximum type safety** - no `any` in the public API, full IDE autocomplete support, and correct type inference throughout the chain.
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install ppipe
18
+ ```
19
+
20
+ ## Quick Start
21
+
22
+ ```typescript
23
+ import ppipe, { _ } from 'ppipe';
24
+
25
+ const add = (x: number, y: number) => x + y;
26
+ const square = (x: number) => x * x;
27
+ const divide = (x: number, y: number) => x / y;
28
+ const double = (x: number) => x * 2;
29
+
30
+ // Basic piping
31
+ const result = ppipe(1)
32
+ .pipe(add, _, 1) // 2
33
+ .pipe(double) // 4
34
+ .pipe(square) // 16
35
+ .pipe(divide, _, 8) // 2
36
+ .pipe(add, _, 1) // 3
37
+ .value;
38
+
39
+ console.log(result); // 3
40
+ ```
41
+
42
+ ## Features
43
+
44
+ ### Basic Piping
45
+
46
+ Chain functions together, passing the result of each to the next:
47
+
48
+ ```typescript
49
+ ppipe('hello')
50
+ .pipe(s => s.toUpperCase())
51
+ .pipe(s => s + '!')
52
+ .value; // 'HELLO!'
53
+ ```
54
+
55
+ ### Placeholder Positioning
56
+
57
+ Use `_` to control where the piped value is inserted:
58
+
59
+ ```typescript
60
+ const _ = ppipe._;
61
+
62
+ // Value inserted at placeholder position
63
+ ppipe(10)
64
+ .pipe(divide, _, 2) // divide(10, 2) = 5
65
+ .value;
66
+
67
+ // Without placeholder, value is appended at the end
68
+ ppipe(10)
69
+ .pipe(divide, 100) // divide(100, 10) = 10
70
+ .value;
71
+
72
+ // Multiple placeholders insert the same value multiple times
73
+ ppipe(5)
74
+ .pipe((a, b) => a + b, _, _) // 5 + 5 = 10
75
+ .value;
76
+ ```
77
+
78
+ ### Async/Promise Support
79
+
80
+ Promises are automatically handled - the chain waits for resolution and passes the unwrapped value to the next function:
81
+
82
+ ```typescript
83
+ async function fetchUser(id: number) {
84
+ const response = await fetch(`/api/users/${id}`);
85
+ return response.json();
86
+ }
87
+
88
+ const userName = await ppipe(1)
89
+ .pipe(fetchUser)
90
+ .pipe(user => user.name)
91
+ .pipe(name => name.toUpperCase());
92
+
93
+ // Or use .then()/.catch()
94
+ ppipe(1)
95
+ .pipe(fetchUser)
96
+ .pipe(user => user.name)
97
+ .then(name => console.log(name))
98
+ .catch(err => console.error(err));
99
+ ```
100
+
101
+ ### Value Extraction
102
+
103
+ Get the current value with `.value` (or `.val`):
104
+
105
+ ```typescript
106
+ // Sync value
107
+ const num = ppipe(5).pipe(x => x * 2).value; // 10
108
+
109
+ // Async value (returns Promise)
110
+ const asyncNum = await ppipe(Promise.resolve(5)).pipe(x => x * 2).value;
111
+ ```
112
+
113
+ ### Typed Extensions
114
+
115
+ Create reusable pipe extensions with full type inference:
116
+
117
+ ```typescript
118
+ const mathPipe = ppipe.extend({
119
+ double: (x: number) => x * 2,
120
+ square: (x: number) => x * x,
121
+ add: (x: number, y: number) => x + y,
122
+ });
123
+
124
+ const result = mathPipe(5)
125
+ .double() // 10 - return type inferred as number
126
+ .square() // 100
127
+ .add(5) // 105
128
+ .value;
129
+
130
+ // Extensions can be chained
131
+ const extendedPipe = mathPipe.extend({
132
+ stringify: (x: number) => String(x),
133
+ });
134
+
135
+ const str = extendedPipe(5)
136
+ .double()
137
+ .stringify() // '10' - return type inferred as string
138
+ .value;
139
+ ```
140
+
141
+ ## API Reference
142
+
143
+ ### `ppipe(value)`
144
+
145
+ Creates a new pipe with the given initial value.
146
+
147
+ ```typescript
148
+ const pipe = ppipe(initialValue);
149
+ ```
150
+
151
+ ### `.pipe(fn, ...args)`
152
+
153
+ Pipes the current value through a function. The value is inserted at the placeholder position, or appended at the end if no placeholder is used.
154
+
155
+ ```typescript
156
+ pipe.pipe(fn) // fn(value)
157
+ pipe.pipe(fn, _, arg2) // fn(value, arg2)
158
+ pipe.pipe(fn, arg1) // fn(arg1, value)
159
+ pipe.pipe(fn, arg1, _) // fn(arg1, value)
160
+ ```
161
+
162
+ ### `.value` / `.val`
163
+
164
+ Gets the current value from the chain. Returns a Promise if any function in the chain was async.
165
+
166
+ ### `.then(onFulfilled?, onRejected?)`
167
+
168
+ Standard Promise `then` interface. Always available for consistent async handling.
169
+
170
+ ### `.catch(onRejected?)`
171
+
172
+ Standard Promise `catch` interface. Always available for consistent async handling.
173
+
174
+ ### `ppipe._`
175
+
176
+ The placeholder symbol for argument positioning.
177
+
178
+ ### `ppipe.extend(extensions)`
179
+
180
+ Creates a new ppipe factory with additional methods:
181
+
182
+ ```typescript
183
+ const extended = ppipe.extend({
184
+ methodName: (value, ...args) => result,
185
+ });
186
+ ```
187
+
188
+ Extension functions receive the piped value as their first argument.
189
+
190
+ ## Migration from v2.x
191
+
192
+ Version 3.0 is a TypeScript rewrite that prioritizes type safety. Some dynamic features that couldn't be strictly typed have been removed:
193
+
194
+ ### Removed Features
195
+
196
+ | Feature | v2.x | v3.x Alternative |
197
+ |---------|------|------------------|
198
+ | Deep property access | `_.a.b.c` | `.pipe(x => x.a.b.c)` |
199
+ | Array spreading | `..._` | `.pipe(arr => fn(...arr))` |
200
+ | Direct method access | `.map(fn)` | `.pipe(arr => arr.map(fn))` |
201
+ | Context binding | `.with(ctx)` | `.pipe(fn.bind(ctx))` |
202
+ | Callable syntax | `ppipe(val)(fn)` | `ppipe(val).pipe(fn)` |
203
+
204
+ ### Why These Changes?
205
+
206
+ These features relied on Proxy magic that returned `any` types, breaking TypeScript's ability to infer types correctly. The v3.x API ensures:
207
+
208
+ - Full IDE autocomplete support
209
+ - Correct type inference throughout the chain
210
+ - No `any` types in the public API
211
+ - Compile-time error detection
212
+
213
+ ## Type Safety
214
+
215
+ ppipe v3.x provides complete type inference:
216
+
217
+ ```typescript
218
+ // Types are inferred correctly through the chain
219
+ const result = ppipe(5)
220
+ .pipe(x => x * 2) // Pipe<number>
221
+ .pipe(x => x.toString()) // Pipe<string>
222
+ .pipe(x => x.length) // Pipe<number>
223
+ .value; // number
224
+
225
+ // Async types are tracked
226
+ const asyncResult = ppipe(Promise.resolve(5))
227
+ .pipe(x => x * 2) // Pipe<number, async=true>
228
+ .value; // Promise<number>
229
+
230
+ // Extension return types are inferred
231
+ const myPipe = ppipe.extend({
232
+ toArray: <T>(x: T) => [x],
233
+ });
234
+
235
+ myPipe(5).toArray().value; // number[]
236
+ ```
237
+
238
+ ## Testing
239
+
240
+ 100% test coverage is maintained. To run tests:
241
+
242
+ ```bash
243
+ npm install
244
+ npm test
245
+ ```
246
+
247
+ ## Contributing
248
+
249
+ See [CONTRIBUTING](https://github.com/egeozcan/ppipe/blob/master/.github/CONTRIBUTING.md).
250
+
251
+ ## Changelog
252
+
253
+ ### v3.0.0
254
+
255
+ - Complete TypeScript rewrite with strict typing
256
+ - Full IDE autocomplete and type inference support
257
+ - Removed features that couldn't be strictly typed (see Migration section)
258
+ - 100% test coverage on source files
259
+ - Strict ESLint rules disable all TypeScript escape hatches:
260
+ - No `any` types
261
+ - No type assertions (`as`)
262
+ - No ts-ignore/ts-expect-error comments
263
+ - No non-null assertions (`!`)
264
+ - Discriminated union state management for type-safe async/sync/error handling
265
+ - Updated all dependencies to latest versions
266
+
267
+ ### v2.x
268
+
269
+ See [v2.x README](https://github.com/egeozcan/ppipe/tree/v2.6.5) for previous features.
270
+
271
+ ## License
272
+
273
+ ISC
@@ -0,0 +1,8 @@
1
+ import type { PipeFactory } from "./types.js";
2
+ import { _ } from "./placeholder.js";
3
+ export type { Extensions, Pipe, PipeFactory, PipeWithExtensions, PlaceholderType } from "./types.js";
4
+ export { isPlaceholder } from "./placeholder.js";
5
+ declare const ppipe: PipeFactory<{}>;
6
+ export { _ };
7
+ export default ppipe;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAc,WAAW,EAA+B,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAIrC,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA+BjD,QAAA,MAAM,KAAK,iBAAkB,CAAC;AAG9B,OAAO,EAAE,CAAC,EAAE,CAAC;AAGb,eAAe,KAAK,CAAC"}