Create a shallow clone of an object.
Install
Install with npm:
npm i clone-object --save-dev
Usage
;
Shallow clone an object.
obj
{Object}obj
The object to clone.return
{Object} The new object.
Example
var extend = ;var a = foo: 'alpha' bar: 'beta' baz: 'gamma';var b = ;a = ; console;//=> a: { foo: 'alpha', bar: 'beta', baz: 'gamma', quux: 'delta' }console;//=> b: { foo: 'alpha', bar: 'beta', baz: 'gamma' }
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on June 30, 2014.