⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
qda-digital.online
/
node_modules
/
fulcon
/
Edit File: README.md
# fulcon [](https://www.npmjs.com/package/fulcon) Clones a function (creates wrapper function), with the same signature as source function [](https://travis-ci.org/alexindigo/fulcon) [](https://travis-ci.org/alexindigo/fulcon) [](https://ci.appveyor.com/project/alexindigo/fulcon) [](https://coveralls.io/github/alexindigo/fulcon?branch=master) [](https://david-dm.org/alexindigo/fulcon) [](https://www.bithound.io/github/alexindigo/fulcon) | compression | size | | :--------------- | ------: | | fulcon.js | 1.02 kB | | fulcon.min.js | 673 B | | fulcon.min.js.gz | 396 B | ## Install ```sh $ npm install --save fulcon ``` ## Example ```javascript var fulcon = require('fulcon'); function original(a, b, c) { return 42 + a + b + c; } assert.strictEqual(original.length, 3, 'signature of the original function has 3 arguments'); assert.strictEqual(original(1, 2, 3), 48, 'original function returns 48'); var cloned = fulcon(original); assert.notStrictEqual(original, cloned, 'original and cloned functions are not the same function'); assert.strictEqual(cloned.length, 3, 'signature of the cloned function has 3 arguments'); assert.strictEqual(cloned(1, 2, 3), 48, 'cloned function returns 48'); ``` _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](test.js) for details._ ## Want to Know More? More examples can be found in [test.js](test.js). Or open an [issue](https://github.com/alexindigo/fulcon/issues) with questions and/or suggestions. ## License Fulcon is released under the [MIT](LICENSE) license.
Simpan