shared-store
Advanced tools
Comparing version 2.0.3 to 2.1.0
@@ -0,1 +1,7 @@ | ||
### 2.1.0 | ||
* feat: allow switching active mode after instantiation - **[@dbushong](https://github.com/dbushong)** [#29](https://github.com/groupon/shared-store/pull/29) | ||
- [`115352a`](https://github.com/groupon/shared-store/commit/115352aec3ec3037587fbda622f47efa6ec97581) **feat:** allow switching active mode after instantiation | ||
### 2.0.3 | ||
@@ -2,0 +8,0 @@ |
@@ -74,5 +74,3 @@ | ||
EventEmitter.call(this); | ||
if (active == null) { | ||
active = cluster.isMaster; | ||
} | ||
this._active = active != null ? active : cluster.isMaster; | ||
this._temp = path.resolve(temp); | ||
@@ -89,3 +87,3 @@ if (this._temp === '/') { | ||
meta = _this._createMeta(); | ||
_this.stream = cachedLoader(meta, loader, _this._temp, active); | ||
_this.stream = cachedLoader(meta, loader, _this._temp, _this._active); | ||
return _this.subscription = _this.stream.subscribe(_this._handleUpdate, _this._handleError); | ||
@@ -100,2 +98,7 @@ }; | ||
SharedStore.prototype.setActive = function(_active) { | ||
this._active = _active != null ? _active : true; | ||
return this._createStream(); | ||
}; | ||
SharedStore.prototype.getCurrent = function() { | ||
@@ -102,0 +105,0 @@ var ref1; |
{ | ||
"name": "shared-store", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "Keeping config data in sync", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -98,3 +98,6 @@ # shared-store | ||
#### `store.setActive(active=true)` | ||
Enables/disables active mode (see constructor). | ||
### `SharedStore.safeMerge` | ||
@@ -101,0 +104,0 @@ |
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
53368
1010
245