clone-object
Create a shallow clone of an object.
Install
Install with npm:
npm i clone-object --save-dev
Usage
clone(obj);
Shallow clone an object.
obj
{Object} obj
The object to clone.return
{Object} The new object.
Example
var extend = require('xtend');
var a = {foo: 'alpha', bar: 'beta', baz: 'gamma'};
var b = cloneObject(a);
a = extend(a, {quux: 'delta'});
console.log('a:', a);
console.log('b:', b);
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.