aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js')
-rw-r--r--node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js
new file mode 100644
index 0000000..60869ef
--- /dev/null
+++ b/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js
@@ -0,0 +1,15 @@
+import { concat } from '../observable/concat';
+import { take } from './take';
+import { ignoreElements } from './ignoreElements';
+import { mapTo } from './mapTo';
+import { mergeMap } from './mergeMap';
+import { innerFrom } from '../observable/innerFrom';
+export function delayWhen(delayDurationSelector, subscriptionDelay) {
+ if (subscriptionDelay) {
+ return function (source) {
+ return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));
+ };
+ }
+ return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); });
+}
+//# sourceMappingURL=delayWhen.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