type-to-reducer
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -19,4 +19,4 @@ 'use strict'; | ||
var iterator = function iterator(reducers) { | ||
var initial = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var prefix = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2]; | ||
var initial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; | ||
@@ -33,3 +33,3 @@ var reducerTypes = Object.keys(reducers || {}); | ||
return function () { | ||
var state = arguments.length <= 0 || arguments[0] === undefined ? initialState : arguments[0]; | ||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; | ||
var action = arguments[1]; | ||
@@ -36,0 +36,0 @@ |
{ | ||
"name": "type-to-reducer", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Create reducer functions based on an object keyed by action types", | ||
@@ -27,16 +27,16 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"babel-cli": "^6.6.5", | ||
"babel-eslint": "^4.1.8", | ||
"babel-plugin-lodash": "^2.2.1", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"babel-register": "^6.6.5", | ||
"chai": "^3.5.0", | ||
"eslint": "~2.2.0", | ||
"babel-cli": "^6.26.0", | ||
"babel-eslint": "^7.2.3", | ||
"babel-plugin-lodash": "^3.2.11", | ||
"babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"babel-preset-env": "^1.6.0", | ||
"babel-register": "^6.26.0", | ||
"chai": "^4.0.2", | ||
"eslint": "^4.6.0", | ||
"eslint-config-rackt": "^1.1.1", | ||
"mocha": "^2.4.5", | ||
"mocha": "^3.5.0", | ||
"pre-push": "^0.1.1", | ||
"sinon": "^1.17.3", | ||
"sinon-chai": "^2.8.0" | ||
"sinon": "^3.2.1", | ||
"sinon-chai": "^2.13.0" | ||
} | ||
} |
@@ -5,2 +5,4 @@ [![Circle CI](https://circleci.com/gh/tomatau/type-to-reducer/tree/master.svg?style=svg)](https://circleci.com/gh/tomatau/type-to-reducer/tree/master) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/tomatau/type-to-reducer.svg)](https://greenkeeper.io/) | ||
Create reducer functions based on an object keyed by action types | ||
@@ -7,0 +9,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
9140
70