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

barracks

Package Overview
Dependencies
Maintainers
4
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

barracks - npm Package Compare versions

Comparing version 8.0.2 to 8.0.3

8

index.js

@@ -161,3 +161,3 @@ const mutate = require('xtend/mutable')

const reducedState = _reducers[actionName](data, _state[ns])
mutate(newState[ns], xtend(_state[ns], reducedState))
newState[ns] = xtend(_state[ns], reducedState)
} else {

@@ -167,3 +167,5 @@ mutate(newState, reducers[actionName](data, _state))

reducersCalled = true
if (onStateChange) onStateChange(data, newState, _state, actionName, createSend)
if (onStateChange) {
onStateChange(data, newState, _state, actionName, createSend)
}
_state = newState

@@ -194,5 +196,5 @@ cb()

function apply (ns, source, target, createSend, done) {
if (ns && !target[ns]) target[ns] = {}
Object.keys(source).forEach(function (key) {
if (ns) {
if (!target[ns]) target[ns] = {}
target[ns][key] = source[key]

@@ -199,0 +201,0 @@ } else {

{
"name": "barracks",
"version": "8.0.2",
"version": "8.0.3",
"description": "Action dispatcher for unidirectional data flows",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -17,9 +17,9 @@ # barracks

console.error(`error: ${err}`)
}),
},
onAction: (data, state, name, caller, createSend) => {
console.log(`data: ${data}`)
})
},
onStateChange: (data, state, prev, caller, createSend) => {
console.log(`state: ${prev} -> ${state}`)
})
}
})

@@ -304,3 +304,3 @@

framework
- [send-action](https://github.com/sethdvincent/send-action) - unidirectional
- [send-action](https://github.com/sethvincent/send-action) - unidirectional
action emitter

@@ -307,0 +307,0 @@

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