@bastienrobert/state
v1.0.0
Published
State management for all engines
Downloads
7
Readme
Install
npm install @bastienrobert/state
Usage
import StateManager from '@bastienrobert/state'
const state = new StateManager(['STATE1', 'STATE2', 'STATE3'])
state.add('STATE1')
state.remove('STATE1')
state.add(['STATE1', 'STATE2'])
state.remove(['STATE1', 'STATE2'])
state.has('STATE1')
state.has(['STATE1', 'STATE2'])
state.get()
API
See the Documentation.
Contributions
Inspired by https://gist.github.com/bloodyowl/5729489.