We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f6f3a75 + aa0829f commit 2ea9e18Copy full SHA for 2ea9e18
README.md
@@ -32,6 +32,21 @@ const result = pipe(
32
console.log(result); // "4"
33
```
34
35
+Or use `async` module to pipe a value through a series of asynchronous operator
36
+functions.
37
+
38
+```ts
39
+import { pipe } from "@core/pipe/async";
40
41
+const result = pipe(
42
+ 1,
43
+ (v) => Promise.resolve(v + 1), // inferred as (v: number) => number | Promise<number>
44
+ (v) => Promise.resolve(v * 2), // inferred as (v: number) => number | Promise<number>
45
+ (v) => Promise.resolve(v.toString()), // inferred as (v: number) => string | Promise<string>
46
+);
47
+console.log(result); // "4"
48
+```
49
50
## License
51
52
The code follows MIT license written in [LICENSE](./LICENSE). Contributors need
0 commit comments