UNPKG

@enea-entertainment/runners

Version:
41 lines (28 loc) 901 B
# Runners Santa's little helper Dependency: [@enea-entertainment/runner](https://www.npmjs.com/package/@enea-entertainment/runner) --- ## Installation ```js npm install --save-dev @enea-entertainment/runners ``` [![NPM](https://nodei.co/npm/@enea-entertainment/runners.png?compact=true)](https://nodei.co/npm/@enea-entertainment/animjs/) --- ## Usage example ```js import { createRunners, destroyRunners } from '@enea-entertainment/runners'; // will create runners object with remove and update Runner(s) // notice number 2 after '|' - it means update runner has 2 arguments this.runners = createRunners({ remove: 'onRemove', update: 'onUpdate|2' }); // dispatch this.runners.remove.dispatch(); this.runners.update.dispatch(x, y); // will detach all listeners from update and remove runners destroyRunners(this.runners); ``` --- ## License MIT, see [LICENSE](LICENSE) for details.