28 lines
271 B
Markdown
28 lines
271 B
Markdown
|
|
# 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
|