# statum

> Simple state machines

Latest version **0.1.2** (published 2015-06-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install statum
pnpm add statum
yarn add statum
bun add statum
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2015-06-15 |
| First published | 2015-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | krambuhl |
| Keywords | state, states, state machines, fsm, finite-state machines |

## Links

- npm: https://www.npmjs.com/package/statum
- Repository: git@github.com:krambuhl/statum
- Homepage: https://github.com/krambuhl/statum
- Issues: https://github.com/krambuhl/statum/issues
- npm.io page: https://npm.io/package/statum

## Alternatives

- [@reckona/mreact-store](https://npm.io/package/@reckona/mreact-store.md) — 976 weekly downloads
- [regular-state](https://npm.io/package/regular-state.md) — 410 weekly downloads
- [@pacote/flux-actions](https://npm.io/package/@pacote/flux-actions.md) — 65 weekly downloads
- [@pilotlab/lux-debug](https://npm.io/package/@pilotlab/lux-debug.md) — 39 weekly downloads
- [vue-persist-state](https://npm.io/package/vue-persist-state.md) — 19 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2015-06-15
- 0.1.1 — 2015-06-15
- 0.1.0 — 2015-06-04

## README

# Statum

Simple state machines

```js
var Statum = require('statum');

var time = new Statum(function() { return new Date(); });
setInterval(time.refresh, 1000);

function isAfterNoon(time) { return time.getHours() > 12; }

time
  .change(isAfterNoon, function() { })
  .enter(isAfterNoon, function() { })
  .exit(isAfterNoon, function() { });

time.state(isAfterNoon, {
  change: function() {},
  enter: function() {},
  exit: function() {}
});

time.state(isAfterNoon, function() {}, function() {});

time.off(isAfterNoon);
```

---
_Source: https://npm.io/package/statum · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
