Wrappers
Wrappers is a small library exporting basic wrapper functions for functions.
Usage
Attach it to the short variable of choice:
var w = ;
then get some cheap extra funcitonality out of your functions with standard wrappers:
var safeInit = w; // invokes wrapped init function at most oncevar tracedFn = w; // logs input and output when calledvar rateLimited = w; // triggers at most every 200msvar burstTrigger = w; // bursts of 5 every second 3 times
Read the API.
This module used to be included in functional utility library interlude, but is now an extra.
Installation
$ npm install wrappers
License
MIT-Licensed. See LICENSE file for details.