Comparing version 1.1.1 to 1.2.0
12
index.js
@@ -9,7 +9,8 @@ "use strict"; | ||
/** | ||
* init new state | ||
* @description init new state | ||
* @public | ||
* @version 1.2.0 | ||
* @param {object} config | ||
* @param {string} config.name name state | ||
* @param {any} config.defaultValue default value | ||
* @param {function} config.willReceive function for before get state | ||
* @param {function} config.willUpdate function for before set state | ||
@@ -23,4 +24,3 @@ * @param {function} config.shouldUpdate function for is need update | ||
Object.defineProperty(state, config.name, { | ||
get: function get() { | ||
config.willReceive && config.willReceive(state.__container__[config.name]); | ||
get: function get() { | ||
return state.__container__[config.name]; | ||
@@ -39,4 +39,6 @@ }, | ||
/** | ||
* state container | ||
* @description state container | ||
* @public | ||
* @version 1.2.0 | ||
*/ | ||
exports.state = state; |
{ | ||
"name": "jetstate", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "state managment", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
4282
5
67
1