aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/rxjs/dist/esm/internal/util/pipe.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/rxjs/dist/esm/internal/util/pipe.js')
-rw-r--r--node_modules/rxjs/dist/esm/internal/util/pipe.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/rxjs/dist/esm/internal/util/pipe.js b/node_modules/rxjs/dist/esm/internal/util/pipe.js
new file mode 100644
index 0000000..fb1cccf
--- /dev/null
+++ b/node_modules/rxjs/dist/esm/internal/util/pipe.js
@@ -0,0 +1,16 @@
+import { identity } from './identity';
+export function pipe(...fns) {
+ return pipeFromArray(fns);
+}
+export function pipeFromArray(fns) {
+ if (fns.length === 0) {
+ return identity;
+ }
+ if (fns.length === 1) {
+ return fns[0];
+ }
+ return function piped(input) {
+ return fns.reduce((prev, fn) => fn(prev), input);
+ };
+}
+//# sourceMappingURL=pipe.js.map \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage