An open API service indexing awesome lists of open source software.

https://github.com/component/clone

object deep clone component
https://github.com/component/clone

Last synced: 8 months ago
JSON representation

object deep clone component

Awesome Lists containing this project

README

          

# clone

Object clone supporting `date`, `regexp`, `array` and `object` types.

## Example

```js
var obj = clone({
a: 'b',
c: [
new Date(),
'tobi',
'jane'
]
})
```

## API

### clone(obj)

Clones `obj` recursively and returns it.

## License

MIT