fn-machine
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "fn-machine", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "a tiny functional state machine", | ||
@@ -5,0 +5,0 @@ "main": "index", |
@@ -9,3 +9,3 @@ /** @typedef {import('./fn-state').CurrentState} CurrentState */ | ||
* @param {function(CurrentState)=} changeCb | ||
* @return {function(string, Object):CurrentState} | ||
* @return {function(string, Object?):CurrentState} | ||
*/ | ||
@@ -12,0 +12,0 @@ export default function machine(states: { |
@@ -10,3 +10,3 @@ /** @typedef {import('./fn-state').CurrentState} CurrentState */ | ||
* @param {function(CurrentState)=} changeCb | ||
* @return {function(string, Object):CurrentState} | ||
* @return {function(string, Object?):CurrentState} | ||
*/ | ||
@@ -18,9 +18,4 @@ export default function machine(states, initialState, initialContext, changeCb = function(state){}) { | ||
const currentState = {state: current, context}; | ||
/** | ||
* @param {string} event | ||
* @param {Object} detail | ||
* @return {CurrentState} | ||
*/ | ||
return function send(event, detail) { | ||
// if no event, return the current state | ||
@@ -27,0 +22,0 @@ if (!event) { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
6096
158