Skip to content

crysalead-js/copy-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

copy-clone

Build Status

Recursively clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives.

API

List of methods:

clone(value, options)

Where options can be the following:

  • 'circular' Boolean: set to true if the object to be cloned may contain circular references. (default: true)
  • 'depth' Integer: clone depth limit. (default: Infinity)
  • 'prototype' String : sets the prototype to be used when cloning an object. (default: parent prototype).

Acknowledgement

Sorry don't remember from where I copy pasted this code from. Don't hesitate to let me know.

About

Recursively clone JavaScript native types.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published