node-clone

0.1.1 • Public • Published

//Universal js Clone function (we think...) //Works for any js object

Release : 0.1.0 initial release

Install :

Create a directory : mkdir node-clone Go to your directory : cd node-clone Clone the repository : git clone https://github.com/Nais/node-clone.git Install : npm link .

Or simply install from npm : npm install node-clone

Example :

//clone setTimeout var Clone=require('node-clone').Clone(setTimeout);

//define my custom setTimeout var myCustomsetTimeout=function(){if (typeof(arguments[0])!='function') console.log('it is not good to call setTimeout not using a function'); Clone.apply(this,arguments); }

//replace setTimeout by my custom setTimeout setTimeout=myCustomsetTimeout;

setTimeout(function(){console.log('Hello World');},1000);

Readme

Keywords

none

Package Sidebar

Install

npm i node-clone

Weekly Downloads

7

Version

0.1.1

License

none

Last publish

Collaborators

  • nais