https://github.com/ariesclark/node-wrapist
Cleanly and effectively wrap functions, with full control.
https://github.com/ariesclark/node-wrapist
Last synced: 6 months ago
JSON representation
Cleanly and effectively wrap functions, with full control.
- Host: GitHub
- URL: https://github.com/ariesclark/node-wrapist
- Owner: ariesclark
- License: agpl-3.0
- Created: 2020-06-21T11:41:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-21T11:51:21.000Z (over 5 years ago)
- Last Synced: 2025-02-12T17:48:28.962Z (8 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-wrapist
Cleanly and effectively wrap functions, with full control.##### Installation
```
npm install wrapist
```##### Usage & Examples
```javascript
const wrapist = require("wrapist");// function (context, options || array);
// Wrap single function.
wrapist(this, {
fn: "get",
ctx: this.util,
rpl: function (rtnv, options) {
// rtnv, refers to the original return value.
return rtnv;
}
});
```