This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
flap with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
:rooster: Guard clauses for JS
flap allows you to cleanly enforce integrity conditions and modifications to the inputs and outputs of functions.
You can also think of it as a generic datal-flow wrapper for functions, with a dash of pattern-matching awesomeness.
Function.prototypefor maximum sugar
npm i flap
You can find detailed documentation and examples at https://flap.js.org.
Contributions are always welcome! Simply open a PR with completely covered tests.
npm run coverage