Comparing version 1.3.3 to 1.3.4
@@ -197,2 +197,3 @@ const { | ||
this._throttle && this._throttle.complete() | ||
super.complete() | ||
} | ||
@@ -235,2 +236,39 @@ } | ||
exports.debounceTime = deliver(DebounceTime) | ||
class _Debounce extends Sink { | ||
next() { | ||
this.complete() | ||
} | ||
complete(err) { | ||
this.defer() | ||
this.sink.next(this.last) | ||
this.isComplete = true | ||
} | ||
} | ||
class Debounce extends Sink { | ||
init(durationSelector) { | ||
this.durationSelector = durationSelector | ||
} | ||
next(data) { | ||
if (!this._debounce) { | ||
this._debounce = new _Debounce(this.sink) | ||
this.defer(this._debounce) | ||
} else if (this._debounce.isComplete) { | ||
this._debounce.isComplete = false | ||
} | ||
this.durationSelector(data)(this._debounce) | ||
this._debounce.last = data | ||
} | ||
complete(err) { | ||
if (err) { | ||
this._debounce && this._debounce.dispose() | ||
super.complete(err) | ||
} else { | ||
this._debounce && this._debounce.complete() | ||
super.complete() | ||
} | ||
} | ||
} | ||
exports.debounce = deliver(Debounce) | ||
class ElementAt extends Sink { | ||
@@ -237,0 +275,0 @@ init(count, defaultValue) { |
{ | ||
"name": "fastrx", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "fast rxjs implemention", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63574
1475