{"maintainers":[{"email":"nopersonsmodules@gmail.com","name":"anonymous"}],"keywords":["shallow","copy","data","object","array"],"dist-tags":{"latest":"0.0.1"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"description":"make a shallow copy of an object or array","readme":"# shallow-copy\n\nmake a shallow copy of an object or array\n\n[![testling badge](https://ci.testling.com/substack/shallow-copy.png)](https://ci.testling.com/substack/shallow-copy)\n\n[![build status](https://secure.travis-ci.org/substack/shallow-copy.png)](http://travis-ci.org/substack/shallow-copy)\n\n# example\n\nyou can copy objects shallowly:\n\n``` js\nvar copy = require('shallow-copy');\n\nvar obj = { a: 3, b: 4, c: [5,6] };\nvar dup = copy(obj);\ndup.b *= 111;\ndup.c.push(7);\n\nconsole.log('original: ', obj);\nconsole.log('copy: ', dup);\n```\n\nand you can copy arrays shallowly:\n\n``` js\nvar copy = require('shallow-copy');\n\nvar xs = [ 3, 4, 5, { f: 6, g: 7 } ];\nvar dup = copy(xs);\ndup.unshift(1, 2);\ndup[5].g += 100;\n\nconsole.log('original: ', xs);\nconsole.log('copy: ', dup);\n```\n\n# methods\n\n``` js\nvar copy = require('shallow-copy')\n```\n\n## copy(obj)\n\nReturn a copy of the enumerable properties of the object `obj` without making\ncopies of nested objects inside of `obj`.\n\nIf `obj` is an array, the result will be an array.\nIf `obj` is an object, the result will be an object.\nIf `obj` is not an object, its value is returned.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install shallow-copy\n```\n\n# license\n\nMIT\n","repository":{"type":"git","url":"git://github.com/substack/shallow-copy.git"},"users":{"simplyianm":true},"bugs":{"url":"https://github.com/substack/shallow-copy/issues"},"license":"MIT","versions":{"0.0.0":{"name":"shallow-copy","version":"0.0.0","description":"make a shallow copy of an object or array","main":"index.js","dependencies":{},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/latest","chrome/latest","safari/latest","opera/latest","android/latest","iphone/latest","ipad/latest"]},"repository":{"type":"git","url":"git://github.com/substack/shallow-copy.git"},"homepage":"https://github.com/substack/shallow-copy","keywords":["shallow","copy","data","object","array"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/substack/shallow-copy/issues"},"_id":"shallow-copy@0.0.0","dist":{"shasum":"9c719d8e7e2d11ed283579a091a83bdc1080d34b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/shallow-copy/-/shallow-copy-0.0.0.tgz","integrity":"sha512-pwner2pzcdPWfo1c1pW8bVr4GqcxEpaiKhTG3u05LWWzziKJx11JlyNYhrrsA/1EcZAxylW8yM7JY847dMpecg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6L4i+2zyicB2w4SvJCHKUYVLunwopGgPS+p2Y1Vq5OwIhANFDKv0iDhpeiWus8zfs/Fp8my7PYcTDofFxyp9CimZ4"}]},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"anonymous","email":"mail@substack.net"},"maintainers":[{"name":"anonymous","email":"mail@substack.net"}],"directories":{}},"0.0.1":{"name":"shallow-copy","version":"0.0.1","description":"make a shallow copy of an object or array","main":"index.js","dependencies":{},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/latest","chrome/latest","safari/latest","opera/latest","android/latest","iphone/latest","ipad/latest"]},"repository":{"type":"git","url":"git://github.com/substack/shallow-copy.git"},"homepage":"https://github.com/substack/shallow-copy","keywords":["shallow","copy","data","object","array"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/substack/shallow-copy/issues"},"_id":"shallow-copy@0.0.1","dist":{"shasum":"415f42702d73d810330292cc5ee86eae1a11a170","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/shallow-copy/-/shallow-copy-0.0.1.tgz","integrity":"sha512-b6i4ZpVuUxB9h5gfCxPiusKYkqTMOjEbBs4wMaFbkfia4yFv92UKZ6Df8WXcKbn08JNL/abvg3FnMAOfakDvUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCewkwrmBXJ3uVhIt8LN2JVO7Tk28J7qERA/lCSftZYvQIgAIcC1EOOSgI20f/4kmx9wB6D1rPMuBBoIg2MVBxNW+0="}]},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"anonymous","email":"mail@substack.net"},"maintainers":[{"name":"anonymous","email":"mail@substack.net"}],"directories":{}}},"name":"shallow-copy","time":{"modified":"2022-11-08T10:40:52.294Z","created":"2013-07-25T04:34:57.810Z","0.0.0":"2013-07-25T04:34:59.273Z","0.0.1":"2013-07-25T06:24:34.297Z"},"readmeFilename":"readme.markdown","homepage":"https://github.com/substack/shallow-copy"}