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

autodux

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autodux - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.travis.yml

2

package.json
{
"name": "autodux",
"version": "1.0.1",
"version": "1.0.2",
"description": "Automate the Redux boilerplate.",

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

@@ -9,2 +9,6 @@ # Autodux

### Known Issues
* Currently requires ES6 features. Should work great in any modern evergreen browser, but has no support for old browsers (e.g., IE).
## Install

@@ -125,4 +129,8 @@

selectors: { getValue },
increment,
decrement
actions: {
increment,
decrement
},
reducer,
initial
} = counter;

@@ -137,6 +145,6 @@

actions.reduce(reducer, initial); // 2
const state = actions.reduce(reducer, initial);
console.log(getValue({ counter: state })); // 2
console.log(increment.type); // 'counter/increment'
console.log(getValue({counter: 3})); // 3
```

@@ -12,3 +12,5 @@ const curry = require('lodash.curry');

const reducer = (state = initial, {type, payload} = {}) => {
const [ namespace, subType ] = type.split('/');
const [ namespace, subType ] = type ?
type.split('/') :
'unknown/unknown'.split('/');

@@ -15,0 +17,0 @@ return (namespace === slice && actions[subType]) ?

@@ -167,1 +167,17 @@ const test = require('tape');

});
test('Calling the reducer with no arguments', assert => {
const msg = 'Should return valid default state';
const initial = { a: 'a' };
const { reducer } = autodux({
initial,
actions: {
reducer: x => x
}
});
const actual = reducer();
const expected = initial;
assert.same(actual, expected, msg);
assert.end();
})
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