diff --git a/package.json b/package.json index 0f7388db..88ef82c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jssm", - "version": "0.6.0", + "version": "0.6.1", "description": "A Javascript state machine with a simple API. Well tested, and typed with Flowtype. MIT License.", "main": "dist/jssm.es5.browserified.js", "scripts": { diff --git a/src/js/jssm-types.js b/src/js/jssm-types.js index be6f70e3..8dce3283 100644 --- a/src/js/jssm-types.js +++ b/src/js/jssm-types.js @@ -43,7 +43,9 @@ type JssmGenericMachine = { allow_empty? : boolean, allow_islands? : boolean, - allow_force? : boolean + allow_force? : boolean, + + keep_history? : boolean | number }; diff --git a/src/js/jssm.js b/src/js/jssm.js index 56f1b7b9..17e07996 100644 --- a/src/js/jssm.js +++ b/src/js/jssm.js @@ -17,7 +17,7 @@ const new_machine = (props:mixed) : JssmMachine => { -class jssm { +class machine { constructor({ transitions } : JssmConfig) { @@ -134,6 +134,8 @@ class jssm { export { + machine, + new_machine, version