Skip to content

Instantly share code, notes, and snippets.

@riscie
Last active May 20, 2020 15:31
Show Gist options
  • Save riscie/0dab2931d28b9ac4ab41be66910fe18b to your computer and use it in GitHub Desktop.
Save riscie/0dab2931d28b9ac4ab41be66910fe18b to your computer and use it in GitHub Desktop.
rxjs 6 (using .pipe) #angular #typescript
import { tap, debounceTime, map, filter } from 'rxjs/operators';
this.$someSubject
.pipe(
tap(console.log),
debounceTime(this.inputDebounceTime),
map(value => parseFloat(value)),
filter(value => !isNaN(value)),
).subscribe(result => {
// ...
}) ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment