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
- Host: GitHub
- URL: https://github.com/component/clone
- Owner: component
- Created: 2012-10-18T16:56:51.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2016-12-19T05:32:26.000Z (over 9 years ago)
- Last Synced: 2025-08-09T03:33:10.770Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 18
- Watchers: 4
- Forks: 16
- Open Issues: 4
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
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