{"_id":"finity","_rev":"4207745","name":"finity","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","dist-tags":{"latest":"0.5.4"},"maintainers":[{"name":"nickuraltsev","email":""}],"time":{"modified":"2026-03-04T17:04:14.000Z","created":"2016-06-03T01:45:06.659Z","0.5.4":"2018-03-07T16:56:35.772Z","0.5.3":"2017-03-08T15:34:17.556Z","0.5.2":"2017-03-01T03:40:39.926Z","0.5.1":"2017-02-23T06:29:16.176Z","0.5.0":"2017-02-21T06:53:29.300Z","0.4.5":"2016-06-23T21:46:12.794Z","0.4.4":"2016-06-21T20:22:33.106Z","0.4.3":"2016-06-10T02:12:16.093Z","0.4.2":"2016-06-04T05:41:13.837Z","0.4.1":"2016-06-04T04:50:55.738Z","0.4.0":"2016-06-03T01:45:06.659Z"},"users":{},"author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"versions":{"0.5.4":{"name":"finity","version":"0.5.4","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","files":["*.md","lib","umd","index.d.ts"],"main":"lib/index.js","types":"index.d.ts","devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-register":"^6.26.0","babel-preset-es2015":"^6.24.1","babel-preset-stage-0":"^6.24.1","babel-loader":"^7.1.4","jasmine":"^3.1.0","jasmine-spec-reporter":"^4.2.1","eslint":"^4.18.2","eslint-config-airbnb":"^16.1.0","eslint-plugin-import":"^2.9.0","eslint-plugin-react":"^7.7.0","eslint-plugin-jsx-a11y":"^6.0.3","babel-eslint":"^8.2.2","isparta":"^4.0.0","coveralls":"^3.0.0","rimraf":"^2.6.2","webpack":"^4.1.0","webpack-cli":"^2.0.10","cross-env":"^5.1.3","typescript":"^2.7.2","shx":"^0.2.2","gzip-size-cli":"^2.1.0"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib && shx cp src/index.commonjs.js lib/index.js","build:umd":"webpack src/index.commonjs.js -o umd/Finity.js --mode development","build:umd:min":"webpack src/index.commonjs.js -o umd/Finity.min.js --mode production","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min && gzip-size umd/Finity.min.js","test:typings":"tsc","test":"node test/support/jasmineRunner.js && npm run test:typings","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly test/support/jasmineRunner.js","lint":"eslint src test examples"},"gitHead":"b9511fd7ecee23899a9a6348e0a0f323074e5c12","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.5.4","_npmVersion":"5.3.0","_nodeVersion":"8.3.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"f2a8a9198e8286467328ec32c8bfcc19a2229c11","size":23426,"noattachment":false,"key":"/finity/-/finity-0.5.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.5.4.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/finity_0.5.4_1520441795722_0.08779167610151783"},"_hasShrinkwrap":false,"publish_time":1520441795772,"_cnpm_publish_time":1520441795772,"_cnpmcore_publish_time":"2021-12-16T20:23:27.530Z"},"0.5.3":{"name":"finity","version":"0.5.3","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","files":["*.md","lib","umd","index.d.ts"],"main":"lib/index.js","types":"index.d.ts","devDependencies":{"babel-cli":"^6.23.0","babel-core":"^6.23.1","babel-register":"^6.23.0","babel-preset-es2015":"^6.22.0","babel-preset-stage-0":"^6.22.0","babel-loader":"^6.3.2","jasmine":"^2.5.3","jasmine-spec-reporter":"^3.2.0","eslint":"^3.16.1","eslint-config-airbnb":"^14.1.0","eslint-plugin-import":"^2.2.0","eslint-plugin-react":"^6.10.0","eslint-plugin-jsx-a11y":"^4.0.0","babel-eslint":"^7.1.1","isparta":"^4.0.0","coveralls":"^2.11.16","rimraf":"^2.6.0","webpack":"^2.2.1","cross-env":"^3.2.3","typescript":"^2.2.1","shx":"^0.2.2","gzip-size-cli":"^2.0.0"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib && shx cp src/index.commonjs.js lib/index.js","build:umd":"webpack src/index.commonjs.js umd/Finity.js","build:umd:min":"webpack -p src/index.commonjs.js umd/Finity.min.js","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min && gzip-size umd/Finity.min.js","test:typings":"tsc","test":"node test/support/jasmineRunner.js && npm run test:typings","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly test/support/jasmineRunner.js","lint":"eslint src test examples"},"gitHead":"f7bd79c4e91656f5c96f07b76e850b8c9cf64680","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.5.3","_shasum":"a8eee233b0a7b0d711e76826db5872a3d9d3a9d4","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"a8eee233b0a7b0d711e76826db5872a3d9d3a9d4","size":22314,"noattachment":false,"key":"/finity/-/finity-0.5.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.5.3.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/finity-0.5.3.tgz_1488987255579_0.6977635747753084"},"directories":{},"publish_time":1488987257556,"_hasShrinkwrap":false,"_cnpm_publish_time":1488987257556,"_cnpmcore_publish_time":"2021-12-16T20:23:27.741Z"},"0.5.2":{"name":"finity","version":"0.5.2","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","files":["*.md","lib","umd","index.d.ts"],"main":"lib/index.js","types":"index.d.ts","devDependencies":{"babel-cli":"^6.23.0","babel-core":"^6.23.1","babel-register":"^6.23.0","babel-preset-es2015":"^6.22.0","babel-preset-stage-0":"^6.22.0","babel-loader":"^6.3.2","jasmine":"^2.5.3","jasmine-spec-reporter":"^3.2.0","eslint":"^3.16.1","eslint-config-airbnb":"^14.1.0","eslint-plugin-import":"^2.2.0","eslint-plugin-react":"^6.10.0","eslint-plugin-jsx-a11y":"^4.0.0","babel-eslint":"^7.1.1","isparta":"^4.0.0","coveralls":"^2.11.16","rimraf":"^2.6.0","webpack":"^2.2.1","cross-env":"^3.1.4","typescript":"^2.2.1","shx":"^0.2.2","gzip-size-cli":"^2.0.0"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib && shx cp src/index.commonjs.js lib/index.js","build:umd":"webpack src/index.commonjs.js umd/Finity.js","build:umd:min":"webpack -p src/index.commonjs.js umd/Finity.min.js","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min && gzip-size umd/Finity.min.js","test:typings":"tsc","test":"node test/support/jasmineRunner.js && npm run test:typings","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly test/support/jasmineRunner.js","lint":"eslint src test examples"},"gitHead":"8d9574dc6de03d0c5c2bba6071e483c8fad237e0","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.5.2","_shasum":"6187992783a5c1264f513522a084557bd32721b1","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"6187992783a5c1264f513522a084557bd32721b1","size":22061,"noattachment":false,"key":"/finity/-/finity-0.5.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.5.2.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/finity-0.5.2.tgz_1488339639641_0.26445455476641655"},"directories":{},"publish_time":1488339639926,"_hasShrinkwrap":false,"_cnpm_publish_time":1488339639926,"_cnpmcore_publish_time":"2021-12-16T20:23:27.934Z"},"0.5.1":{"name":"finity","version":"0.5.1","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","files":["*.md","lib","umd","index.d.ts"],"main":"lib/index.js","types":"index.d.ts","devDependencies":{"babel-cli":"^6.23.0","babel-core":"^6.23.1","babel-register":"^6.23.0","babel-preset-es2015":"^6.22.0","babel-preset-stage-0":"^6.22.0","babel-loader":"^6.3.2","jasmine":"^2.5.3","jasmine-spec-reporter":"^3.2.0","eslint":"^3.16.1","eslint-config-airbnb":"^14.1.0","eslint-plugin-import":"^2.2.0","eslint-plugin-react":"^6.10.0","eslint-plugin-jsx-a11y":"^4.0.0","babel-eslint":"^7.1.1","isparta":"^4.0.0","coveralls":"^2.11.16","rimraf":"^2.6.0","webpack":"^2.2.1","cross-env":"^3.1.4","typescript":"^2.2.1","shx":"^0.2.2","gzip-size-cli":"^2.0.0"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib && shx cp src/index.commonjs.js lib/index.js","build:umd":"webpack src/index.commonjs.js umd/Finity.js","build:umd:min":"webpack -p src/index.commonjs.js umd/Finity.min.js","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min && gzip-size umd/Finity.min.js","test:typings":"tsc","test":"node test/support/jasmineRunner.js && npm run test:typings","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly test/support/jasmineRunner.js","lint":"eslint src test examples"},"gitHead":"14c72745b31f95ae0eb41e50cdf46887d37c8824","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.5.1","_shasum":"0a32f26dfec8729fefb55c6e3049ed43d26a7485","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"0a32f26dfec8729fefb55c6e3049ed43d26a7485","size":21614,"noattachment":false,"key":"/finity/-/finity-0.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.5.1.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/finity-0.5.1.tgz_1487831355384_0.3345815378706902"},"directories":{},"publish_time":1487831356176,"_hasShrinkwrap":false,"_cnpm_publish_time":1487831356176,"_cnpmcore_publish_time":"2021-12-16T20:23:28.153Z"},"0.5.0":{"name":"finity","version":"0.5.0","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","files":["*.md","lib","umd","index.d.ts"],"main":"lib/index.js","types":"index.d.ts","devDependencies":{"babel-cli":"^6.18.0","babel-core":"^6.21.0","babel-register":"^6.18.0","babel-preset-es2015":"^6.18.0","babel-preset-stage-0":"^6.16.0","babel-loader":"^6.2.10","jasmine":"^2.5.2","jasmine-spec-reporter":"^3.0.0","eslint":"^3.13.0","eslint-config-airbnb":"^13.0.0","eslint-plugin-import":"^2.2.0","eslint-plugin-react":"^6.8.0","eslint-plugin-jsx-a11y":"^2.2.3","babel-eslint":"^7.1.1","isparta":"^4.0.0","coveralls":"^2.11.15","rimraf":"^2.5.4","webpack":"^1.14.0","cross-env":"^3.1.4","typescript":"^2.1.4","shx":"^0.2.2"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib && shx cp src/index.commonjs.js lib/index.js","build:umd":"cross-env NODE_ENV=development webpack src/index.commonjs.js umd/Finity.js","build:umd:min":"cross-env NODE_ENV=production webpack -p src/index.commonjs.js umd/Finity.min.js","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min","test:typings":"tsc","test":"node test/support/jasmineRunner.js && npm run test:typings","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly test/support/jasmineRunner.js","lint":"eslint src test examples"},"gitHead":"50baa030bd6b1421b28cd2ac7a8e16a2a27ee092","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.5.0","_shasum":"7fca11ccf670f2516062cb24f64537bf772a4e79","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"7fca11ccf670f2516062cb24f64537bf772a4e79","size":22658,"noattachment":false,"key":"/finity/-/finity-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.5.0.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/finity-0.5.0.tgz_1487660009076_0.5813724857289344"},"directories":{},"publish_time":1487660009300,"_hasShrinkwrap":false,"_cnpm_publish_time":1487660009300,"_cnpmcore_publish_time":"2021-12-16T20:23:28.491Z"},"0.4.5":{"name":"finity","version":"0.4.5","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","files":["*.md","lib","umd","index.d.ts"],"main":"lib/index.js","typings":"index.d.ts","devDependencies":{"babel-cli":"^6.9.0","babel-core":"^6.9.0","babel-register":"^6.9.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-0":"^6.5.0","babel-loader":"^6.2.4","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0","eslint":"^2.10.2","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.8.0","eslint-plugin-react":"^5.1.1","eslint-plugin-jsx-a11y":"^1.2.0","babel-eslint":"^6.0.4","isparta":"^4.0.0","coveralls":"^2.11.9","rimraf":"^2.5.2","webpack":"^1.13.1","cross-env":"^1.0.8","typings":"^1.0.4","typescript":"^1.8.10"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib","build:umd":"cross-env NODE_ENV=development webpack src/index.js umd/Finity.js","build:umd:min":"cross-env NODE_ENV=production webpack -p src/index.js umd/Finity.min.js","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min","test:typings":"typings install && tsc","test":"node test/support/jasmineRunner.js && npm run test:typings","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly test/support/jasmineRunner.js","lint":"eslint src test examples"},"gitHead":"e3a30b890a629287a3c2f2e0d96dc4971972354f","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.4.5","_shasum":"cf754cef2ce31e2cde48d830af3b8cd085adbebe","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"cf754cef2ce31e2cde48d830af3b8cd085adbebe","size":16984,"noattachment":false,"key":"/finity/-/finity-0.4.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.4.5.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/finity-0.4.5.tgz_1466718372232_0.5030825717840344"},"directories":{},"publish_time":1466718372794,"_hasShrinkwrap":false,"_cnpm_publish_time":1466718372794,"_cnpmcore_publish_time":"2021-12-16T20:23:28.907Z"},"0.4.4":{"name":"finity","version":"0.4.4","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","files":["*.md","lib","umd","index.d.ts"],"main":"lib/index.js","typings":"index.d.ts","devDependencies":{"babel-cli":"^6.9.0","babel-core":"^6.9.0","babel-register":"^6.9.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-0":"^6.5.0","babel-loader":"^6.2.4","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0","eslint":"^2.10.2","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.8.0","eslint-plugin-react":"^5.1.1","eslint-plugin-jsx-a11y":"^1.2.0","babel-eslint":"^6.0.4","isparta":"^4.0.0","coveralls":"^2.11.9","rimraf":"^2.5.2","webpack":"^1.13.1","cross-env":"^1.0.8","typings":"^1.0.4","typescript":"^1.8.10"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib","build:umd":"cross-env NODE_ENV=development webpack src/index.js umd/Finity.js","build:umd:min":"cross-env NODE_ENV=production webpack -p src/index.js umd/Finity.min.js","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min","test:typings":"typings install && tsc","test":"babel-node test/support/jasmineRunner && npm run test:typings","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly test/support/jasmineRunner.js","lint":"eslint src test examples"},"gitHead":"fde62dc11879c73541f80add387237f3894c332d","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.4.4","_shasum":"bde892a3e12170a46bb99ae0ae0f9a02faa05f04","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"bde892a3e12170a46bb99ae0ae0f9a02faa05f04","size":16980,"noattachment":false,"key":"/finity/-/finity-0.4.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.4.4.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/finity-0.4.4.tgz_1466540552649_0.5100062165874988"},"directories":{},"publish_time":1466540553106,"_hasShrinkwrap":false,"_cnpm_publish_time":1466540553106,"_cnpmcore_publish_time":"2021-12-16T20:23:29.100Z"},"0.4.3":{"name":"finity","version":"0.4.3","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"files":["*.md","lib","umd","index.d.ts"],"main":"lib/index.js","typings":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"devDependencies":{"babel-cli":"^6.9.0","babel-core":"^6.9.0","babel-register":"^6.9.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-0":"^6.5.0","babel-loader":"^6.2.4","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0","eslint":"^2.10.2","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.8.0","eslint-plugin-react":"^5.1.1","eslint-plugin-jsx-a11y":"^1.2.0","babel-eslint":"^6.0.4","isparta":"^4.0.0","coveralls":"^2.11.9","rimraf":"^2.5.2","webpack":"^1.13.1","cross-env":"^1.0.8","typings":"^1.0.4","typescript":"^1.8.10"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib","build:umd":"cross-env NODE_ENV=development webpack src/index.js umd/Finity.js","build:umd:min":"cross-env NODE_ENV=production webpack -p src/index.js umd/Finity.min.js","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min","test:typings":"typings install && tsc","test":"babel-node test/support/jasmineRunner && npm run test:typings","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly test/support/jasmineRunner.js","lint":"eslint src test examples"},"gitHead":"a0135538f8596ab0036e4decd6c927ac547ec61d","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.4.3","_shasum":"93309ffb686d55416bc051954d90a6aff3dd5184","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"93309ffb686d55416bc051954d90a6aff3dd5184","size":16954,"noattachment":false,"key":"/finity/-/finity-0.4.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.4.3.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/finity-0.4.3.tgz_1465524732117_0.5214571163523942"},"directories":{},"publish_time":1465524736093,"_hasShrinkwrap":false,"_cnpm_publish_time":1465524736093,"_cnpmcore_publish_time":"2021-12-16T20:23:29.352Z"},"0.4.2":{"name":"finity","version":"0.4.2","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"files":["*.md","lib","umd"],"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"devDependencies":{"babel-cli":"^6.9.0","babel-core":"^6.9.0","babel-register":"^6.9.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-0":"^6.5.0","babel-plugin-add-module-exports":"^0.2.1","babel-loader":"^6.2.4","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0","eslint":"^2.10.2","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.8.0","eslint-plugin-react":"^5.1.1","eslint-plugin-jsx-a11y":"^1.2.0","babel-eslint":"^6.0.4","isparta":"^4.0.0","coveralls":"^2.11.9","rimraf":"^2.5.2","webpack":"^1.13.1","cross-env":"^1.0.8"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib","build:umd":"cross-env NODE_ENV=development webpack src/index.js umd/Finity.js","build:umd:min":"cross-env NODE_ENV=production webpack -p src/index.js umd/Finity.min.js","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min","test":"babel-node spec/support/jasmineRunner","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly spec/support/jasmineRunner.js","lint":"eslint src spec examples"},"gitHead":"5e30d114aa18a1818d04ce87c596ae6ccf5bce5e","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.4.2","_shasum":"8c647103e3d2e850bc18fa498cf1f1cb7a944de8","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"8c647103e3d2e850bc18fa498cf1f1cb7a944de8","size":16228,"noattachment":false,"key":"/finity/-/finity-0.4.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.4.2.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/finity-0.4.2.tgz_1465018873378_0.7362014239188284"},"directories":{},"publish_time":1465018873837,"_hasShrinkwrap":false,"_cnpm_publish_time":1465018873837,"_cnpmcore_publish_time":"2021-12-16T20:23:29.561Z"},"0.4.1":{"name":"finity","version":"0.4.1","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"files":["*.md","lib","umd"],"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"devDependencies":{"babel-cli":"^6.9.0","babel-core":"^6.9.0","babel-register":"^6.9.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-0":"^6.5.0","babel-loader":"^6.2.4","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0","eslint":"^2.10.2","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.8.0","eslint-plugin-react":"^5.1.1","eslint-plugin-jsx-a11y":"^1.2.0","babel-eslint":"^6.0.4","isparta":"^4.0.0","coveralls":"^2.11.9","rimraf":"^2.5.2","webpack":"^1.13.1","cross-env":"^1.0.8"},"scripts":{"clean":"rimraf lib && rimraf umd","build:commonjs":"babel src --out-dir lib","build:umd":"cross-env NODE_ENV=development webpack src/index.js umd/Finity.js","build:umd:min":"cross-env NODE_ENV=production webpack -p src/index.js umd/Finity.min.js","build":"npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min","test":"babel-node spec/support/jasmineRunner","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly spec/support/jasmineRunner.js","lint":"eslint src spec examples"},"gitHead":"3b3f7548e16f257516c32bcbfd7685a8f6173a5b","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.4.1","_shasum":"2e89bde2bcb9c948f09c9bff45e596857d610501","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"2e89bde2bcb9c948f09c9bff45e596857d610501","size":16142,"noattachment":false,"key":"/finity/-/finity-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.4.1.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/finity-0.4.1.tgz_1465015852656_0.7105757216922939"},"directories":{},"publish_time":1465015855738,"_hasShrinkwrap":false,"_cnpm_publish_time":1465015855738,"_cnpmcore_publish_time":"2021-12-16T20:23:29.755Z"},"0.4.0":{"name":"finity","version":"0.4.0","description":"A finite state machine library for Node.js and the browser with a friendly configuration DSL","keywords":["state","machine","state machine","finite state machine","fsm"],"bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT","author":{"name":"Nick Uraltsev","email":"nick.uraltsev@gmail.com"},"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/nickuraltsev/finity.git"},"devDependencies":{"babel-cli":"^6.9.0","babel-core":"^6.9.0","babel-register":"^6.9.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-0":"^6.5.0","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0","eslint":"^2.10.2","eslint-config-airbnb":"^9.0.1","eslint-plugin-import":"^1.8.0","eslint-plugin-react":"^5.1.1","eslint-plugin-jsx-a11y":"^1.2.0","babel-eslint":"^6.0.4","isparta":"^4.0.0","coveralls":"^2.11.9","rimraf":"^2.5.2"},"scripts":{"clean":"rimraf lib","build":"npm run clean && babel src --out-dir lib","test":"babel-node spec/support/jasmineRunner","coverage":"babel-node node_modules/isparta/bin/isparta cover --root src --report lcovonly spec/support/jasmineRunner.js","lint":"eslint src spec examples"},"gitHead":"648d575741d17f3ccd9b19c6fb4011f0789feb02","homepage":"https://github.com/nickuraltsev/finity#readme","_id":"finity@0.4.0","_shasum":"f1d23613ce2460551e9b7285fa252264574dc898","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"nickuraltsev","email":"nick.uraltsev@gmail.com"},"dist":{"shasum":"f1d23613ce2460551e9b7285fa252264574dc898","size":7392,"noattachment":false,"key":"/finity/-/finity-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/finity/download/finity-0.4.0.tgz"},"maintainers":[{"name":"nickuraltsev","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/finity-0.4.0.tgz_1464918304018_0.9734230432659388"},"directories":{},"publish_time":1464918306659,"_hasShrinkwrap":false,"_cnpm_publish_time":1464918306659,"_cnpmcore_publish_time":"2021-12-16T20:23:29.935Z"}},"readme":"# finity\n\n[![npm version](https://badge.fury.io/js/finity.svg)](https://badge.fury.io/js/finity)\n[![Build Status](https://api.travis-ci.org/nickuraltsev/finity.svg?branch=master)](https://travis-ci.org/nickuraltsev/finity)\n[![Coverage Status](https://coveralls.io/repos/nickuraltsev/finity/badge.svg?branch=master&service=github)](https://coveralls.io/github/nickuraltsev/finity?branch=master)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/nickuraltsev/finity/master/LICENSE)\n[![Greenkeeper badge](https://badges.greenkeeper.io/nickuraltsev/finity.svg)](https://greenkeeper.io/)\n\nA finite state machine library for Node.js and the browser with a friendly configuration DSL.\n\n## Features\n\n- Event-based, time-based, and Promise-based triggers\n- Entry, exit, and transition actions\n- Guard conditions\n- Self-transitions and internal transitions\n- Hierarchical state machines\n- State machine event hooks\n- Fluent configuration API\n- No external dependencies\n- 3.7 kB minified and gzipped\n- TypeScript typings\n\n## Installation\n\nInstall `finity` using [npm](https://www.npmjs.org/):\n\n```\nnpm install --save finity\n```\n\nThen you can import it using ES2015 or CommonJS modules:\n\n```js\n// ES2015\nimport Finity from 'finity';\n\n// CommonJS\nconst Finity = require('finity');\n```\n\nThe UMD build is available on [unpkg](https://unpkg.com/):\n\n```html\n<script src=\"https://unpkg.com/finity/umd/Finity.min.js\"></script>\n```\n\n## Example\n\n```javascript\nconst worker = Finity\n  .configure()\n    .initialState('ready')\n      .on('task_submitted').transitionTo('running')\n    .state('running')\n      .do((state, context) => processTaskAsync(context.eventPayload))\n        .onSuccess().transitionTo('succeeded')\n        .onFailure().transitionTo('failed')\n      .onTimeout(1000)\n        .transitionTo('timed_out')\n    .global()\n      .onStateEnter(state => console.log(`Entering state '${state}'`))\n  .start();\n\nworker.handle('task_submitted', task);\n```\n\n[More examples](https://github.com/nickuraltsev/finity/tree/master/examples)\n\n## Usage\n\n### Configuration\n\nBefore you can create and start a state machine, you need to create a state machine configuration using Finity configuration DSL. The entry point to the DSL is the `Finity.configure` method.\n\n#### States\n\nTo define the initial state, use the `initialState` method. To add other states, use the `state` method. Both methods take the state name as a parameter.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n    .state('state2')\n```\n\nA state machine must have one and only one initial state.\n\n#### Transitions\n\nA transition from one state to another can be triggered by an event-based, time-based, or Promise-based trigger.\n\n##### Event-based triggers\n\nTo add a transition that is triggered by a specific event, first call the `on` method, passing in the name of the event. Then call the `transitionTo` method, passing in the name of the target state.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n      .on('eventA').transitionTo('state2')\n      .on('eventB').transitionTo('state3')\n    .state('state2')\n      .on('eventC').transitionTo('state1')\n```\n\nTo add a catch-all transition that is triggered by any event, use the `onAny` method. (Event-specific transitions take precedence over catch-all transitions.)\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n        // Perform a transition to state2 when eventA occurs\n      .on('eventA').transitionTo('state2')\n      // Perform a transition to state3 when any other event occurs\n      .onAny().transitionTo('state3')  \n```\n\n##### Time-based triggers\n\nTo add a transition that is triggered when a specific amount of time has passed since entering the state,\nuse the `onTimeout` method which accepts the amount of time in milliseconds as a parameter.\n\n```javascript\n// Perform a transition from state1 to state2 when 100 milliseconds have passed\n// since entering state1\nFinity\n  .configure()\n    .initialState('state1')\n      .onTimeout(100).transitionTo('state2')\n\n// If eventA occurs before 100 milliseconds have passed, perform a transition to\n// state2; otherwise, perform a transition to state3\nFinity\n  .configure()\n    .initialState('state1')\n      .on('eventA').transitionTo('state2')\n      .onTimeout(100).transitionTo('state3')\n```\n\n##### Promise-based triggers\n\nA transition can be triggered by the completion of an async operation.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n      .do(asyncOperation) // asyncOperation is a function that returns a Promise\n        .onSuccess().transitionTo('state2')\n        .onFailure().transitionTo('state3')\n```\n\nThe result or error can be accessed through the [context](#context) object.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n      // httpClient.get makes an HTTP request and returns a Promise that will\n      // resolve with the response if the request succeeds or reject if the\n      // request fails\n      .do(() => httpClient.get('https://api.github.com/users/nickuraltsev'))\n        .onSuccess().transitionTo('state2').withAction((from, to, context) =>\n          console.log('Response: ', context.result)\n        )\n        .onFailure().transitionTo('state3').withAction((from, to, context) =>\n          console.log('Error: ', context.error)\n        )\n```\n\n#### Entry and exit actions\n\nA state can have entry and exit actions associated with it, which are functions that are called when the state is about to be entered or exited, respectively.\n\nEntry and exit actions receive two parameters:\n\n- `state` - The name of the state to be entered or exited.\n- `context` - The current [context](#context).\n\nUse the `onEnter` method to add an entry action to a state, and the `onExit` method to add an exit action.\n\n```javascript\nFinity\n  .configure()\n    .initialState('ready')\n      .on('task_submitted').transitionTo('running')\n    .state('running')\n      .onEnter(() => console.log('Processing task...'))\n      .onExit(() => console.log('All done!'))\n```\n\nYou can add multiple entry actions to a state. They will be executed in the same order as they have been added. The same is true for exit actions.\n\n#### Transition actions\n\nTransitions can have actions associated with them. Transition actions are functions that are called when the transition is executed.\n\nA transition action receives three parameters:\n\n- `fromState` - The name of the transition's source state.\n- `toState` - The name of the transition's target state.\n- `context` - The current [context](#context).\n\nTo add an action to a transition, use the `withAction` method.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n      .on('eventA')\n        .transitionTo('state2')\n          .withAction(() => console.log('Transitioning to next state'))\n```\n\nYou can add multiple actions to a transition. They will be executed in the same order as they have been added.\n\n#### Guard conditions\n\nA transition can have a guard condition attached, which is a function that is used to determine if the transition is allowed. A transition with a guard condition can be executed only if the guard condition returns a truthy value.\n\nA guard condition function receives the current [context](#context) as a parameter.\n\nTo set a guard condition for a transition, use the `withCondition` method.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n      .on('eventA')\n        // Perform a transition to state2 if `fn` returns a truthy value\n        .transitionTo('state2').withCondition(fn)\n        // Otherwise, perform a transition to state3\n        .transitionTo('state3')\n```\n\nA transition cannot have more than one guard condition.\n\n#### Self-transitions and internal transitions\n\nSelf-transitions and internal transitions are transitions from a state to itself.\n\nWhen a self-transition is executed, the state is exited and re-entered, and thus the entry and exit actions are executed. In contrast, an internal transition does not cause exit and reentry to the state.\n\nTo add a self-transition to a state, use the `selfTransition` method. To add an internal transition, call the `internalTransition` method.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n      .on('eventA').selfTransition()\n      .on('eventB').internalTransition()\n```\n\nSelf-transitions and internal transitions can have actions and guard conditions attached.\n\n#### Ignoring events\n\nTo ignore an event, use the `ignore` method.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n      .on('eventA').ignore()\n```\n\nEvents can be conditionally ignored using the `withCondition` method.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n      .on('eventA')\n        // If `fn1` returns a truthy value, perform a transition to state2\n        .transitionTo('state2').withCondition(fn1)\n        // Else if `fn2` returns a truthy value, ignore the event\n        .ignore().withCondition(fn2)\n        // Otherwise, perform a transition to state3\n        .transitionTo('state3')\n```\n\n#### Global hooks\n\nGlobal hooks are functions that are called on certain state machine events, such as state entry, state exit, and state transition.\n\nGlobal hooks are similar to entry, exit, and transition actions. The main difference is that global hooks are called for any state or transition, while actions are called only for the state or transition that they are attached to.\n\n##### `onStateEnter`\n\nCalled when the state machine is about to enter a state.\n\n###### Parameters\n\n- `state` - The name of the state to be entered.\n- `context` - The current [context](#context).\n\n```javascript\nFinity\n  .configure()\n    .global()\n      .onStateEnter(state => console.log(`Entering state '${state}'`))\n```\n\n##### `onStateExit`\n\nCalled when the state machine is about to exit a state.\n\n###### Parameters\n\n- `state` - The name of the state to be exited.\n- `context` - The current [context](#context).\n\n```javascript\nFinity\n  .configure()\n    .global()\n      .onStateExit(state => console.log(`Exiting state '${state}'`))\n```\n\n##### `onTransition`\n\nCalled when the state machine is executing a transition.\n\n###### Parameters\n\n- `fromState` - The name of the transition's source state.\n- `toState` - The name of the transition's target state.\n- `context` - The current [context](#context).\n\n```javascript\nFinity\n  .configure()\n    .global()\n      .onTransition((fromState, toState) =>\n        console.log(`Transitioning from '${fromState}' to '${toState}'`)\n      )\n```\n\n##### `onStateChange`\n\nCalled when the state of the state machine is about to change.\n\nIn contrast to `onTransition` hooks, `onStateChange` hooks are not called when executing a self-transition or internal transition as these types of transitions do not cause a state change.\n\n###### Parameters\n\n- `oldState` - The name of the old state.\n- `newState` - The name of the new state.\n- `context` - The current [context](#context).\n\n```javascript\nFinity\n  .configure()\n    .global()\n      .onStateChange((oldState, newState) =>\n        console.log(`Changing state from '${oldState}' to '${newState}'`)\n      )\n```\n\nYou can register multiple global hooks of the same type. They will be called in the same order as they have been registered.\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n    .global()\n      .onStateEnter(state => console.log(`Entering state '${state}'`))\n      .onStateEnter(state => console.log('We are almost there!'))\n```\n\n#### Unhandled events\n\nBy default, if a state machine receives an event that it cannot handle, it will throw an error. You can override this behavior by registering an `onUnhandledEvent` hook.\n\nAn `onUnhandledEvent` hook receives three parameters:\n\n- `event` - The name of the event.\n- `state` - The name of the state.\n- `context` - The current [context](#context).\n\n```javascript\nFinity\n  .configure()\n    .initialState('state1')\n    .global()\n      .onUnhandledEvent((event, state) =>\n        console.log(`Unhandled event '${event}' in state '${state}'.`)\n      )\n```\n\nYou can register multiple `onUnhandledEvent` hooks. They will be executed in the same order as they have been registered.\n\n### Creating and starting a state machine\n\nOnce you have created a configuration, you can create and start a state machine. There are two ways to do this. The easiest way is to call the `start` method of the configuration API.\n\n```javascript\nconst stateMachine = Finity\n  .configure()\n    .initialState('state1')\n  .start();\n```\n\nIf you don't want to start a state machine right away or you need to create multiple instances of a state machine with the same configuration, you can call the `getConfig` method to get the configuration first. Then you can create and start new state machine instances by passing the configuration to the `Finity.start` method.\n\n```javascript\nconst config = Finity\n  .configure()\n    .initialState('state1')\n  .getConfig();\n\nconst firstInstance = Finity.start(config);\nconst secondInstance = Finity.start(config);\n```\n\nWhen a state machine is started, it enters the initial state and all the `onStateEnter` hooks and the initial state's entry actions are executed. However, the `onTransition` and `onStateChange` hooks are not executed.\n\n### Sending an event to a state machine\n\nTo send an event to a state machine, pass the event name as the first parameter to the `handle` method of the state machine object.\n\n```javascript\nconst stateMachine = Finity\n  .configure()\n    .initialState('state1')\n      .on('eventA').transitionTo('state2')\n  .start();\n\n// This will trigger a transition from state1 to state2.\nstateMachine.handle('eventA');\n```\n\nYou can send an event with a payload by passing the payload as the optional second parameter. The event payload can be accessed in entry, exit, and transition actions, guard conditions, async operations, and global hooks through the [context](#context) object.\n\n```javascript\nconst stateMachine = Finity\n  .configure()\n    .initialState('state1')\n      .on('eventA').transitionTo('state2').withAction((fromState, toState, context) => {\n        console.log('Payload:', context.eventPayload);\n      })\n  .start();\n\nstateMachine.handle('eventA', { foo: 'bar' }); // Note: A payload can be of any type.\n```\n\nIf a state machine cannot handle the specified event, it will throw an error or execute the `onUnhandledEvent` hooks if any are registered (see [Unhandled events](#unhandled-events)).\n\n### Checking if a state machine can handle an event\n\nYou can check if a state machine, in its current state, can handle a given event via the `canHandle` method. Like the `handle` method, it takes an event name and an optional payload. If the specified event can be handled, the `canHandle` method returns `true`; otherwise, it returns `false`.\n\n```javascript\nconst stateMachine = Finity\n  .configure()\n    .initialState('state1')\n      .on('eventA').transitionTo('state2')\n  .start();\n\nconsole.log(stateMachine.canHandle('eventA')); // true\nconsole.log(stateMachine.canHandle('eventB')); // false\n```\n\n### Getting the current state of a state machine\n\nTo get the current state of a state machine, call the `getCurrentState` method on the state machine object.\n\n```javascript\nconst stateMachine = Finity\n  .configure()\n    .initialState('state1')\n  .start();\n\nconsole.log(stateMachine.getCurrentState()); // state1\n```\n\n### Context\n\nA context object is passed to all entry, exit, and transition actions, guard conditions, async operations, and global hooks.\n\n#### Properties\n\n- `stateMachine` - The current state machine instance.\n- `event` - The name of the event. This property is only present when the state machine is handling an event.\n- `eventPayload` - The payload of the event. This property is only present when the state machine is handling an event that has a payload.\n- `result` - The async operation result.\n- `error` - The async operation error.\n\n### Hierarchical state machines\n\n```javascript\nconst submachineConfig = Finity\n  .configure()\n    .initialState('s21')\n      .on('eventB').transitionTo('s22')\n    .global()\n      .onStateEnter(substate => console.log(`  - Entering substate '${substate}'`))\n      .onStateExit(substate => console.log(`  - Exiting substate '${substate}'`))\n  .getConfig();\n\nconst stateMachine = Finity\n  .configure()\n    .initialState('s1')\n      .on('eventA').transitionTo('s2')\n    .state('s2')\n      .submachine(submachineConfig) // s2 is a submachine state\n      .on('eventC').transitionTo('s3')\n    .global()\n      .onStateEnter(state => console.log(`- Entering state '${state}'`))\n      .onStateExit(state => console.log(`- Exiting state '${state}'`))\n  .start();\n\nstateMachine.handle('eventA');\n\nstateMachine.handle('eventB');\n\nstateMachine.handle('eventC');\n```\n\nThe above code will generate the following output:\n\n```\n- Entering state 's1'\n- Exiting state 's1'\n- Entering state 's2'\n  - Entering substate 's21'\n  - Exiting substate 's21'\n  - Entering substate 's22'\n  - Exiting substate 's22'\n- Exiting state 's2'\n- Entering state 's3'\n```\n\n## TypeScript Support\n\nFinity includes [TypeScript typings](https://github.com/nickuraltsev/finity/blob/master/index.d.ts).\n\n## Contributing\n\nBug reports and pull requests are welcome!\n\nBy participating in this project you agree to abide by the [code of conduct](https://github.com/nickuraltsev/finity/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\n[MIT](https://github.com/nickuraltsev/finity/blob/master/LICENSE)\n","_attachments":{},"homepage":"https://github.com/nickuraltsev/finity#readme","bugs":{"url":"https://github.com/nickuraltsev/finity/issues"},"license":"MIT"}