{"_id":"clone-shallow","_rev":"101485","name":"clone-shallow","description":"Shallow clone objects and arrays, or return primitive values directly.","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:35:24.000Z","created":"2014-06-30T09:40:25.847Z","0.1.1":"2014-06-30T11:00:13.062Z","0.1.0":"2014-06-30T09:40:25.847Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/clone-shallow.git"},"versions":{"0.1.1":{"name":"clone-shallow","description":"Shallow clone objects and arrays, or return primitive values directly.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/clone-shallow","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/clone-shallow.git"},"bugs":{"url":"https://github.com/jonschlinkert/clone-shallow/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/clone-shallow/blob/master/LICENSE-MIT"}],"keywords":["clone","util","array","object","shallow","deep","utils"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"verb":"~0.2.6","chai":"~1.9.1","mocha":"*"},"dependencies":{"clone-array":"^0.1.1","clone-object":"^0.1.0"},"_id":"clone-shallow@0.1.1","_shasum":"69b0001dfdbf7042c0bb77bbefd971311c9be4f8","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"69b0001dfdbf7042c0bb77bbefd971311c9be4f8","size":2952,"noattachment":false,"key":"/clone-shallow/-/clone-shallow-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/clone-shallow/download/clone-shallow-0.1.1.tgz"},"directories":{},"publish_time":1404126013062,"_cnpm_publish_time":1404126013062,"_hasShrinkwrap":false},"0.1.0":{"name":"clone-shallow","description":"Shallow clone objects and arrays, or return primitive values directly.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/clone-shallow","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/clone-shallow.git"},"bugs":{"url":"https://github.com/jonschlinkert/clone-shallow/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/clone-shallow/blob/master/LICENSE-MIT"}],"keywords":["clone","util","array","object","shallow","deep","utils"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"verb":"~0.2.6","chai":"~1.9.1","mocha":"*"},"_id":"clone-shallow@0.1.0","_shasum":"1c24a8afedc86b0dd886b4cdfb5e099f1dc17497","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"1c24a8afedc86b0dd886b4cdfb5e099f1dc17497","size":2929,"noattachment":false,"key":"/clone-shallow/-/clone-shallow-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/clone-shallow/download/clone-shallow-0.1.0.tgz"},"directories":{},"publish_time":1404121225847,"_cnpm_publish_time":1404121225847,"_hasShrinkwrap":false}},"readme":"# clone-shallow [![NPM version](https://badge.fury.io/js/clone-shallow.png)](http://badge.fury.io/js/clone-shallow)\n\n> Shallow clone objects and arrays, or return primitive values directly.\n\n## Install\nInstall with [npm](npmjs.org):\n\n```bash\nnpm i clone-shallow --save-dev\n```\n\n## Usage\n\n```js\nclone(value);\n```\n\n* `value` {*} The value to clone.\n* `return` {*} The cloned value.\n\n## Example\n\nArrays:\n\n```js\nvar a = ['a', 'b', 'c'];\nvar b = clone(a);\na = a.concat('new');\n\nconsole.log('a:', a);\n//=> a: [ 'a', 'b', 'c', 'new' ]\n\nconsole.log('b:', b);\n//=> b: [ 'a', 'b', 'c' ]\n```\nObjects:\n\n```js\nvar extend = require('xtend');\nvar a = {foo: 'alpha', bar: 'beta', baz: 'gamma'};\nvar b = cloneObject(a);\na = extend(a, {quux: 'delta'});\n\nconsole.log('a:', a);\n//=> a: { foo: 'alpha', bar: 'beta', baz: 'gamma', quux: 'delta' }\nconsole.log('b:', b);\n//=> b: { foo: 'alpha', bar: 'beta', baz: 'gamma' }\n```\n\nAlso see:\n\n* [clone-array](https://github.com/jonschlinkert/clone-array) if you just need to clone arrays.\n* [clone-object](https://github.com/jonschlinkert/clone-object) if you just need to clone objects.\n\n\n## Author\n\n**Jon Schlinkert**\n \n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) \n\n## License\nCopyright (c) 2014 Jon Schlinkert, contributors.  \nReleased under the MIT license\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 30, 2014._","_attachments":{},"homepage":"https://github.com/jonschlinkert/clone-shallow","bugs":{"url":"https://github.com/jonschlinkert/clone-shallow/issues"}}