dispatchable-store
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -182,11 +182,11 @@ 'use strict'; | ||
/** | ||
* @function | ||
* @name setState | ||
* @memberof DispatchableStore | ||
* @desc update state of self | ||
* @private | ||
* @param {Object} action | ||
* @param {Object} prev | ||
* @param {Object} state | ||
*/ | ||
* @function | ||
* @name setState | ||
* @memberof DispatchableStore | ||
* @desc update state of self | ||
* @private | ||
* @param {Object} action | ||
* @param {Object} prev | ||
* @param {Object} state | ||
*/ | ||
@@ -193,0 +193,0 @@ }]); |
{ | ||
"name": "dispatchable-store", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "lib/index.js", | ||
@@ -11,3 +11,5 @@ "license": "MIT", | ||
"pretest": "npm run build", | ||
"test": "nyc ava test/*.js" | ||
"fix": "prettier --write src/*.js", | ||
"test:ava": "nyc ava test/*.js", | ||
"test:lint": "eslint src/*.js" | ||
}, | ||
@@ -21,8 +23,14 @@ "dependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-eslint": "^8.0.3", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"eslint": "^4.13.0", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint-plugin-prettier": "^2.3.1", | ||
"eslint-plugin-react": "^7.5.1", | ||
"jsdoc": "^3.5.5", | ||
"minami": "^1.2.3", | ||
"npm-run-all": "^4.1.2", | ||
"nyc": "^11.3.0" | ||
"nyc": "^11.3.0", | ||
"prettier": "^1.9.1" | ||
}, | ||
@@ -29,0 +37,0 @@ "babel": { |
const { EventEmitter2 } = require('eventemitter2') | ||
const setState = Symbol('SetState'); | ||
const setState = Symbol('SetState') | ||
const isFunc = (maybeFunc) => typeof maybeFunc == 'function'; | ||
const isObj = (maybeObj) => typeof maybeObj == 'object'; | ||
const isFunc = maybeFunc => typeof maybeFunc == 'function' | ||
const isObj = maybeObj => typeof maybeObj == 'object' | ||
@@ -114,3 +114,3 @@ /** | ||
*/ | ||
subscribe = (stateMapper) => (callback) => { | ||
subscribe = stateMapper => callback => { | ||
this.on('change', ({ action, prev, state }) => { | ||
@@ -121,14 +121,14 @@ const target = stateMapper(state) | ||
}) | ||
} | ||
}; | ||
/** | ||
* @function | ||
* @name setState | ||
* @memberof DispatchableStore | ||
* @desc update state of self | ||
* @private | ||
* @param {Object} action | ||
* @param {Object} prev | ||
* @param {Object} state | ||
*/ | ||
* @function | ||
* @name setState | ||
* @memberof DispatchableStore | ||
* @desc update state of self | ||
* @private | ||
* @param {Object} action | ||
* @param {Object} prev | ||
* @param {Object} state | ||
*/ | ||
[setState] = (nextState, action) => { | ||
@@ -135,0 +135,0 @@ const prev = this.state |
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 14 instances 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
3076894
85
2169
15
28