This commit is contained in:
Aleksandra Usacheva 2019-11-28 15:41:32 +03:00
parent a8d9578848
commit 862b6a4128
No known key found for this signature in database
GPG Key ID: A749C17B07D29A0E
2 changed files with 1 additions and 10 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@rbkmoney/partial-fetcher",
"version": "1.0.1",
"version": "1.0.2",
"description": "An library for fetching data from endpoints that uses continuationToken.",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -1,9 +0,0 @@
import { distinctUntilChanged, debounce } from 'rxjs/operators';
import { timer, empty, Observable } from 'rxjs';
export const booleanDebounceTime = (timeoutMs: number = 500) => (s: Observable<boolean>): Observable<boolean> =>
s.pipe(
distinctUntilChanged(),
debounce(v => (v ? timer(timeoutMs) : empty())),
distinctUntilChanged()
);