SkillAgentSearch skills...

Flap

:rooster: Guard clauses for JS

Install / Use

/learn @slurmulon/Flap
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated2y ago
Forks0

Languages

JavaScript

Security Score

75/100

Audited on Aug 17, 2023

No findings