traps
Trap me if you can!
traps
leverages proxies and allows to easily create chainable api
s.
You can register traps which will be invoked when a specific method is invoked or capture all method invocations in a sink.
Install
npm install --save traps
Usage
// capture all method invocationsconst api = api// =>// foo, ['bar']// baz, ['qux'] // register a trapapi// => WOOT!, ['a wombat'] // invoke an lambda trapapi// => I do not have a name.
License
MIT © Nicolas Gryman