Skip to content

Instantly share code, notes, and snippets.

@CubikNeRubik
Created April 21, 2021 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CubikNeRubik/372c1a85cb16ffe5e9cabf845d9a888a to your computer and use it in GitHub Desktop.
Save CubikNeRubik/372c1a85cb16ffe5e9cabf845d9a888a to your computer and use it in GitHub Desktop.
RxJS. Delayed output
const { interval, of } = Rx;
const { concatAll, map, first, delay } = RxOperators;
of(...[1,2,3,4]).pipe(
map(val =>
of(val).pipe(
delay(1000),
first(),
)
),
concatAll()
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment