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

}

Readme

Keywords

none

Package Sidebar

Install

npm i clonenode

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • johnnyscript