Comparing version 9.0.0 to 9.1.0
12
index.js
@@ -31,2 +31,4 @@ const mutate = require('xtend/mutable') | ||
var stopped = false | ||
const subscriptions = start._subscriptions = {} | ||
@@ -42,2 +44,3 @@ const reducers = start._reducers = {} | ||
start.use = use | ||
start.stop = stop | ||
return start | ||
@@ -204,2 +207,4 @@ | ||
function _send (name, data, caller, cb) { | ||
if (stopped) return | ||
assert.equal(typeof name, 'string', 'barracks._send: name should be a string') | ||
@@ -256,2 +261,9 @@ assert.equal(typeof caller, 'string', 'barracks._send: caller should be a string') | ||
} | ||
// stop an app, essentially turns | ||
// all send() calls into no-ops. | ||
// () -> null | ||
function stop () { | ||
stopped = true | ||
} | ||
} | ||
@@ -258,0 +270,0 @@ |
{ | ||
"name": "barracks", | ||
"version": "9.0.0", | ||
"version": "9.1.0", | ||
"description": "Action dispatcher for unidirectional data flows", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -149,2 +149,11 @@ # barracks | ||
### store.stop() | ||
After an app is "stopped" all subsequent `send()` calls become no-ops. | ||
```js | ||
store.stop() | ||
send('trimBeard') // -> does not call a reducer/effect | ||
``` | ||
## Handler signatures | ||
@@ -151,0 +160,0 @@ These are the signatures for the properties that can be passed into a model. |
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
25734
264
365