Comparing version 0.4.22 to 0.4.24
@@ -1,2 +0,2 @@ | ||
/* rx-queue version 0.4.22 */ | ||
/* rx-queue version 0.4.24 */ | ||
(function (global, factory) { | ||
@@ -50,3 +50,12 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators')) : | ||
/** | ||
* DebounceQueue drops a item if there's another one comes in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
class DebounceQueue extends RxQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period) { | ||
@@ -67,3 +76,11 @@ super(period); | ||
/** | ||
* DelayQueue passes all the items and add delays between items. | ||
* T: item type | ||
*/ | ||
class DelayQueue extends RxQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period) { | ||
@@ -92,3 +109,10 @@ super(period); | ||
}; | ||
/** | ||
* DelayQueueExector calls functions one by one with a delay time period between calls. | ||
*/ | ||
class DelayQueueExector extends DelayQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period) { | ||
@@ -120,3 +144,14 @@ super(period); | ||
/** | ||
* ThrottleQueue | ||
* | ||
* passes one item and then drop all the following items in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
class ThrottleQueue extends RxQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period) { | ||
@@ -123,0 +158,0 @@ super(period); |
@@ -38,3 +38,3 @@ var __extends = (this && this.__extends) || (function () { | ||
}; | ||
/* rx-queue version 0.4.22 */ | ||
/* rx-queue version 0.4.24 */ | ||
(function (global, factory) { | ||
@@ -91,4 +91,13 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators')) : | ||
}(rxjs.Subject)); | ||
/** | ||
* DebounceQueue drops a item if there's another one comes in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
var DebounceQueue = /** @class */ (function (_super) { | ||
__extends(DebounceQueue, _super); | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
function DebounceQueue(period) { | ||
@@ -110,4 +119,12 @@ var _this = _super.call(this, period) || this; | ||
}(RxQueue)); | ||
/** | ||
* DelayQueue passes all the items and add delays between items. | ||
* T: item type | ||
*/ | ||
var DelayQueue = /** @class */ (function (_super) { | ||
__extends(DelayQueue, _super); | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
function DelayQueue(period) { | ||
@@ -147,4 +164,11 @@ var _this = _super.call(this, period) || this; | ||
}; | ||
/** | ||
* DelayQueueExector calls functions one by one with a delay time period between calls. | ||
*/ | ||
var DelayQueueExector = /** @class */ (function (_super) { | ||
__extends(DelayQueueExector, _super); | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
function DelayQueueExector(period) { | ||
@@ -180,4 +204,15 @@ var _this = _super.call(this, period) || this; | ||
}(DelayQueue)); | ||
/** | ||
* ThrottleQueue | ||
* | ||
* passes one item and then drop all the following items in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
var ThrottleQueue = /** @class */ (function (_super) { | ||
__extends(ThrottleQueue, _super); | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
function ThrottleQueue(period) { | ||
@@ -184,0 +219,0 @@ var _this = _super.call(this, period) || this; |
import RxQueue from './rx-queue'; | ||
/** | ||
* DebounceQueue drops a item if there's another one comes in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
export declare class DebounceQueue<T = any> extends RxQueue<T> { | ||
private subscription; | ||
private subject; | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period?: number); | ||
@@ -6,0 +15,0 @@ next(item: T): void; |
import { Subject, interval, } from 'rxjs'; | ||
import { debounce, } from 'rxjs/operators'; | ||
import RxQueue from './rx-queue'; | ||
/** | ||
* DebounceQueue drops a item if there's another one comes in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
export class DebounceQueue extends RxQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period) { | ||
@@ -6,0 +15,0 @@ super(period); |
import DelayQueue from './delay-queue'; | ||
/** | ||
* DelayQueueExector calls functions one by one with a delay time period between calls. | ||
*/ | ||
export declare class DelayQueueExector extends DelayQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period: number); | ||
@@ -4,0 +11,0 @@ execute<T = any>(fn: () => T): Promise<T>; |
@@ -10,3 +10,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import DelayQueue from './delay-queue'; | ||
/** | ||
* DelayQueueExector calls functions one by one with a delay time period between calls. | ||
*/ | ||
export class DelayQueueExector extends DelayQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period) { | ||
@@ -13,0 +20,0 @@ super(period); |
import RxQueue from './rx-queue'; | ||
/** | ||
* DelayQueue passes all the items and add delays between items. | ||
* T: item type | ||
*/ | ||
export declare class DelayQueue<T = any> extends RxQueue<T> { | ||
private subscription; | ||
private subject; | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period?: number); | ||
@@ -6,0 +14,0 @@ next(item: T): void; |
import { Subject, of, empty, concat, } from 'rxjs'; | ||
import { concatMap, delay, } from 'rxjs/operators'; | ||
import RxQueue from './rx-queue'; | ||
/** | ||
* DelayQueue passes all the items and add delays between items. | ||
* T: item type | ||
*/ | ||
export class DelayQueue extends RxQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period) { | ||
@@ -6,0 +14,0 @@ super(period); |
import RxQueue from './rx-queue'; | ||
/** | ||
* ThrottleQueue | ||
* | ||
* passes one item and then drop all the following items in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
export declare class ThrottleQueue<T = any> extends RxQueue<T> { | ||
private subscription; | ||
private subject; | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period?: number); | ||
@@ -6,0 +17,0 @@ next(item: T): void; |
import { Subject, interval, } from 'rxjs'; | ||
import { throttle, } from 'rxjs/operators'; | ||
import RxQueue from './rx-queue'; | ||
/** | ||
* ThrottleQueue | ||
* | ||
* passes one item and then drop all the following items in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
export class ThrottleQueue extends RxQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor(period) { | ||
@@ -6,0 +17,0 @@ super(period); |
{ | ||
"name": "rx-queue", | ||
"version": "0.4.22", | ||
"version": "0.4.24", | ||
"description": "Easy to Use ReactiveX Queue that Supports Delay/DelayExector/Throttle/Debounce Features Powered by RxJS.", | ||
@@ -51,3 +51,3 @@ "main": "bundles/rx-queue.umd.js", | ||
"git-scripts": "git+https://github.com/nkzawa/git-scripts.git", | ||
"rollup": "^0.59.4", | ||
"rollup": "^0.60.0", | ||
"rollup-plugin-json": "^3.0.0", | ||
@@ -54,0 +54,0 @@ "rxjs": "^6.1.0", |
@@ -12,2 +12,7 @@ import { | ||
/** | ||
* DebounceQueue drops a item if there's another one comes in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
export class DebounceQueue<T = any> extends RxQueue<T> { | ||
@@ -17,2 +22,6 @@ private subscription : Subscription | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor( | ||
@@ -19,0 +28,0 @@ period?: number, // milliseconds |
@@ -9,3 +9,10 @@ import DelayQueue from './delay-queue' | ||
/** | ||
* DelayQueueExector calls functions one by one with a delay time period between calls. | ||
*/ | ||
export class DelayQueueExector extends DelayQueue { | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor( | ||
@@ -12,0 +19,0 @@ period: number, |
@@ -15,2 +15,6 @@ import { | ||
/** | ||
* DelayQueue passes all the items and add delays between items. | ||
* T: item type | ||
*/ | ||
export class DelayQueue<T = any> extends RxQueue<T> { | ||
@@ -20,2 +24,6 @@ private subscription : Subscription | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor( | ||
@@ -22,0 +30,0 @@ period?: number, // milliseconds |
@@ -12,2 +12,9 @@ import { | ||
/** | ||
* ThrottleQueue | ||
* | ||
* passes one item and then drop all the following items in a period of time. | ||
* | ||
* T: item type | ||
*/ | ||
export class ThrottleQueue<T = any> extends RxQueue<T> { | ||
@@ -17,2 +24,6 @@ private subscription : Subscription | ||
/** | ||
* | ||
* @param period milliseconds | ||
*/ | ||
constructor( | ||
@@ -19,0 +30,0 @@ period?: number, // milliseconds |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
98257
1365