Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
clone-function
Advanced tools
Clones non native JavaScript functions, or references native functions.
Clones non native JavaScript functions, or references native functions.
npm install clone-function
https://npmjs.org/package/clone-function Source code available at: https://github.com/matthewkastor/clone-function/
var cloneFunction = require('clone-function');
var func = function () {
return 'wee';
};
var copied = func;
var cloned = cloneFunction(func);
console.log(func === copied); // true
console.log(func === cloned); // false
console.log(func() === cloned()); // true
In the browser, include ./browser/clone-function_web.js
in your page. cloneFunction
will
be available globally in your page.
For full documentation see the docs folder. For examples see the example folder.
Tests can be run from the root of this package with
npm test
There are several other scripts listed in package.json for development and
hacking on this module. They can be run with npm run-script
followed by the
scripts property corresponding to the script you want to run. For example,
given a script called buildDocs
, it could be run from the package root by:
npm run-script buildDocs
Matthew Kastor atropa
matthewkastor@gmail.com https://plus.google.com/100898583798552211130
FAQs
Clones non native JavaScript functions, or references native functions.
The npm package clone-function receives a total of 1,860 weekly downloads. As such, clone-function popularity was classified as popular.
We found that clone-function demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.