wrapist
v0.0.1
Published
Cleanly and effectively wrap functions, with full control.
Downloads
2
Readme
node-wrapist
Cleanly and effectively wrap functions, with full control.
Installation
npm install wrapist
Usage & Examples
const wrapist = require("wrapist");
// function (context, options || array<options>);
// Wrap single function.
wrapist(this, {
fn: "get",
ctx: this.util,
rpl: function (rtnv, options) {
// rtnv, refers to the original return value.
return rtnv;
}
});