{"id":26700587,"url":"https://github.com/cicerchie/fsm","last_synced_at":"2025-06-15T18:34:10.447Z","repository":{"id":57101932,"uuid":"398031131","full_name":"cicerchie/fsm","owner":"cicerchie","description":"Fast and carefree Typescript state machine.","archived":false,"fork":false,"pushed_at":"2021-08-22T13:22:17.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-13T15:15:44.949Z","etag":null,"topics":["state-machine","state-machines","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cicerchie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-19T17:57:57.000Z","updated_at":"2021-08-22T13:22:18.000Z","dependencies_parsed_at":"2022-08-20T21:40:56.197Z","dependency_job_id":null,"html_url":"https://github.com/cicerchie/fsm","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cicerchie%2Ffsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cicerchie%2Ffsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cicerchie%2Ffsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cicerchie%2Ffsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cicerchie","download_url":"https://codeload.github.com/cicerchie/fsm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245759384,"owners_count":20667712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["state-machine","state-machines","typescript","typescript-library"],"created_at":"2025-03-27T00:28:32.162Z","updated_at":"2025-03-27T00:28:32.608Z","avatar_url":"https://github.com/cicerchie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cicerchie FSM\n\nA fast and **carefree** Typescript state machine.\u003cbr\u003e\u003cbr\u003e\n\n![Lastest release](https://badgen.net/github/release/cicerchie/fsm)\n![License](https://badgen.net/github/license/cicerchie/fsm)\n![Github repo dependents](https://badgen.net/github/dependents-repo/cicerchie/fsm)\n![Github pkg dependents](https://badgen.net/github/dependents-pkg/cicerchie/fsm)\n![Github open issues](https://badgen.net/github/open-issues/cicerchie/fsm)\n![Github status](https://badgen.net/github/checks/cicerchie/fsm/master/Release)\n![Bundlephobia MinZip](https://badgen.net/bundlephobia/minzip/@cicerchie/fsm)\n![Bundlephobia dependency count](https://badgen.net/bundlephobia/dependency-count/@cicerchie/fsm)\n![Snyk](https://badgen.net/snyk/cicerchie/fsm)\n![Npm version](https://badgen.net/npm/v/@cicerchie/fsm)\n![Npm DT](https://badgen.net/npm/dt/@cicerchie/fsm)\n![Npm dependents](https://badgen.net/npm/dependents/@cicerchie/fsm)\n![Npm types](https://badgen.net/npm/types/@cicerchie/fsm)\n![David DM dep](https://badgen.net/david/dep/cicerchie/fsm)\n![David DM dev-dep](https://badgen.net/david/dev/cicerchie/fsm)\n![David DM peer-dep](https://badgen.net/david/peer/cicerchie/fsm)\n\n---\n\n### \u003cspan style=\"color:red\"\u003eWARNING!\u003c/span\u003e\n\nThese components are still \"experimental\" (`v0.x.x`).\u003cbr\u003e\nSome of them are not tested as rigourously as it should be and none of them have been through code review.\u003cbr\u003e\nUse them at your own risk and check that them do what you want them to do.\n\n---\n\n## Installation\n\n```\nnpm install -D @cicerchie/fsm\n```\n\n## Usage\n\nYou can see how it's used in [@cicerchie/svelte-swr](https://github.com/cicerchie/svelte-swr) project.\n\n## Changelog\n\nIs automagically updated with each release and [you can read it here](https://github.com/cicerchie/fsm/blob/master/CHANGELOG.md).\n\n## Features\n\n- [x] Finite states (non-nested)\n- [x] Initial state\n- [x] Transitions (object)\n- [x] Transitions (string target)\n- [x] Delayed transitions\n- [x] Context\n- [x] Entry actions\n- [x] Exit actions\n- [x] Transition actions\n- [x] Transition guards\n- [x] Parameterized actions\n- [x] Async actions with onDone/onError\n- [ ] Typescript ready (still incomplete and so many `any`!)\n\n## TODO\n\n- [ ] Docs (HELP!)\n- [ ] Tests (HELP!)\n- [ ] Demo site (using `routes` dir: it's a SvelteKit app!)\n\n## Motivation\n\nThis project was born after looking for a good typed library for massive use in low-end devices.\n\nNeither [Robot](https://github.com/matthewp/robot) (it is not written in Typescript) nor [XState](https://github.com/statelyai/xstate) (too big) nor its \"mini version\" [@xstate/fsm](https://xstate.js.org/docs/packages/xstate-fsm/) (lacking essential features) did satisfy us.\n\nBy chance we found [the great article](https://imfeld.dev/writing/simple_state_machines) by [@dimfeld](https://github.com/dimfeld) that lit the way: what a golden boy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcicerchie%2Ffsm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcicerchie%2Ffsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcicerchie%2Ffsm/lists"}