farr
v1.2.2
Published
arrays of functions only
Downloads
2
Readme
— farr
—
Documentation
Please see Docs.
arrays of functions only
This module exports a single class Farr
, that extends the native Array class.
Anytime an array-index-valued property of a Farr
is set, the provided value gets filtered:
- If the value is a
function
, it's left as-is. - If the value is not a
function
, it's replaced by a new anonymous function that produces the value when called.
This means thatFarr
arrays only store function
elements or empty slots.
Methods
Farr
instances have various methods.
Terminal Methods
These are unary, asynchronous and non-chainable:
- .all
- .cascade
- .periodic
Nonterminal Methods
These are variadic, synchronous and chainable:
- .at
- .after
- .nCycles
- .premap
Installation
Run npm install farr
Usage
Please see Tutorials link at the top of this page.
Testing
Run npm test
Dependents
This module is a parent class for another module farr-this. The farr-this module will auto-run the tests from this module, so changes made here should also work there.
Contributing Guidelines
- All tests must pass (see Dependents) and all new functionality must include tests.
- Code must adhere to JavaScript Standard Style.
- New code must include JSDoc documentation.
- Build must pass TravisCI.
Thanks.