Soucouyant is a powerful JavaScript state management library. It comes in two flavours Kiss and Enchilada. Common state management requirements should prefer the Kiss variant. The full variant can be ideal for persistent state management .e.g (Undo/ Redo history) and trajectories e.g. (Advanced animations).
Although Soucouyant is a full featured state management system, please remember there are no brownie points for over-engineering your application. Please respect simplicity as a first principle.
npm i soucouyant
Set the vendor flag to the name of your third party
git clone git@github.com:julienetie/soucouyant.git \
&& npm run install --prefix soucouyant --vendor='./vendor'
This command puts the soucouyant builds into your specified --vendor folder and deletes the ./sououyant folder after.
export { o, pending, republish, alias, head, chain, mutex } from 'soucouyant.js'The Kiss build (keep it simple stupid) features publish, subscribe, inversion and finite state abilities. It's a small but powerful state management API for applications that do not need to persist state-change. soucouyant.kiss.min.js is under 1kB.
<script type="module" src="soucouyant.kiss.min.js"></script>Soucouyant Enchilada features the complete API which includes persistent state, persistent storage, finite-state trajectories, and the ability to archive state (e.g. send to the server). soucouyant.min.js is under 3kB.
<script type="module" src="soucouyant.min.js"></script><!-- Legacy non-module support (Does not support ES5)
<script src="soucouyant.umd.js"></script> -->// Kiss Native
import {o, pending, republish, mutex } from './soucouyant.kiss.js'
/* Kiss Bundler
import {o, pending, republish, mutex } from 'soucouyant/kiss' */// Enchilada Native
import { o, pending, republish, alias, head, chain, mutex } from './soucouyant.js'
/* Enchilada Bundler
import { o, pending, republish, alias, head, chain, mutex } from 'soucouyant' */// Enchilada CJS
const { o, pending, republish, alias, head, chain, mutex } = require('soucouyant.umd.js')Arwork by Alexandra Guardia
MIT © Julien Etienne 2024