Nibbling Perfect Macaroni
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

clonenode

0.0.2 • Public • Published
npm install clodeNode

module.exports = deepClone

function deepClone(el){

	var node = el.cloneNode();

	Array.prototype.slice.call(el.childNodes).forEach(function(child){
	  node.appendChild(deepClone(child))	
	});

	return node

}

Keywords

none

install

npm i clonenode

Downloadsweekly downloads

3

version

0.0.2

license

none

repository

githubgist

last publish

collaborators

  • avatar