Clones a function (creates wrapper function), with the same signature as source function
compression | size |
---|---|
fulcon.js | 1.03 kB |
fulcon.min.js | 686 B |
fulcon.min.js.gz | 386 B |
Install
$ npm install --save fulcon
Example
var fulcon = ; { return 42 + a + b + c;} assert;assert; var cloned = ; assert; assert;assert;
Note: Beware of functions with side-effects! Cloned function calls original function under the hood, so it has same side-effects for better or for worst. Check test.js for details.
Want to Know More?
More examples can be found in test.js.
Or open an issue with questions and/or suggestions.
License
Fulcon is released under the MIT license.