1.0.3 • Published 5 years ago
flap v1.0.3
flap
:rooster: Guard clauses for JS
Summary
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.
Features
- Wraps JS functions and their arguments with guard clauses found in languages such as Elixir and Haskell
- Elegantly modifies and reacts to arguments based on expressions
- Pattern matching against object arguments
- Improves readability of complex conditions by chaining discrete units of logic
- Helps prevent deep nesting and callback hell
- Optionally bind to
Function.prototype
for maximum sugar
Installation
npm i flap
Documentation
You can find detailed documentation and examples at https://flap.js.org.
Contributing
Contributions are always welcome! Simply open a PR with completely covered tests.
npm run coverage
License
MIT
1.0.3
5 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
0.1.14
8 years ago
0.1.13
8 years ago
0.1.12
8 years ago
0.1.11
8 years ago
0.1.10
8 years ago
0.1.9
8 years ago
0.1.8
8 years ago
0.1.7
8 years ago
0.1.6
8 years ago
0.1.5
8 years ago
0.1.4
8 years ago
0.1.3
8 years ago
0.1.2
8 years ago
0.1.1
8 years ago
0.1.0
8 years ago
0.0.1
8 years ago
0.0.0
8 years ago