Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shared-store

Package Overview
Dependencies
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shared-store - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

### 2.1.2
* Safer interval handling - **[@jkrems](https://github.com/jkrems)** [#31](https://github.com/groupon/shared-store/pull/31)
- [`bfb7276`](https://github.com/groupon/shared-store/commit/bfb72765ba460a2f1af73b93eb5715f222cdf0ba) **fix:** Safer interval handling
- [`4bd2ffa`](https://github.com/groupon/shared-store/commit/4bd2ffaafa666916e7e6384ab41d7479affe46cd) **test:** Pass on node 6
### 2.1.1

@@ -2,0 +9,0 @@

24

lib/interval.js

@@ -43,3 +43,25 @@

} else {
return load().concat(Observable.interval(interval).flatMap(load));
return Observable.create(function(observer) {
var dispose, loadSubscription, prepareNext, runLoad, timeoutHandle;
loadSubscription = timeoutHandle = null;
dispose = function() {
if (timeoutHandle) {
clearTimeout(timeoutHandle);
}
if (loadSubscription) {
loadSubscription.dispose();
}
return loadSubscription = timeoutHandle = null;
};
prepareNext = function() {
dispose();
return timeoutHandle = setTimeout(runLoad, interval);
};
runLoad = function() {
dispose();
return loadSubscription = load().subscribe(observer.onNext.bind(observer), observer.onError.bind(observer), prepareNext);
};
runLoad();
return dispose;
});
}

@@ -46,0 +68,0 @@ } else {

2

package.json
{
"name": "shared-store",
"version": "2.1.1",
"version": "2.1.2",
"description": "Keeping config data in sync",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc