{"name":"shallow-clone","description":"Creates a shallow clone of any JavaScript value.","version":"3.0.1","homepage":"https://github.com/jonschlinkert/shallow-clone","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"contributors":[{"name":"Brian Woodward","url":"https://twitter.com/doowb"},{"name":"Jon Schlinkert","url":"http://twitter.com/jonschlinkert"}],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/shallow-clone.git"},"bugs":{"url":"https://github.com/jonschlinkert/shallow-clone/issues"},"license":"MIT","main":"index.js","engines":{"node":">=8"},"scripts":{"test":"mocha"},"dependencies":{"kind-of":"^6.0.2"},"devDependencies":{"gulp-format-md":"^2.0.0","mocha":"^6.1.3"},"keywords":["array","clone","copy","extend","mixin","object","primitive","shallow"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true},"related":{"list":["assign-deep","clone-deep","is-plain-object","kind-of"]}},"gitHead":"be39af9c1224ba65d57c3da95ab2d396bad3f2b9","_id":"shallow-clone@3.0.1","_npmVersion":"6.5.0","_nodeVersion":"11.9.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"integrity":"sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==","shasum":"8f2981ad92531f55035b01fb230769a40e02efa3","tarball":"http://registry-npm.ywwl.com/shallow-clone/download/shallow-clone-3.0.1.tgz","fileCount":4,"unpackedSize":9446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctRyTCRA9TVsSAnZWagAAK0IP/3bAwWqnsdhLgtowdxJm\n6cycI7dxZ8Lsjd5I3e7mQ77uQv92o4yOX6Lqs822o91qAqUW8+xOhDUuCkhr\n+M8QhZs3/Eo3owZTwej7a6mRsqNEaMA1K2oFp5fDE+B3h4vwJRQ7EiSyv8Be\nCKUz5UZ397J43DAW9LDXfP7L5XeTLHbF9PmDAC5zmJPPeyJERWkqqJLc2iOr\nYrJ9npW0DMXEDNxZ16+SqzcBwtPPkcCDwunJN4bxAgNtv5WdlHEhjAfrFXxe\nYE5liz/qQGP/+gmfIlqTb0kjkSkg5nwhJlXX926Pte39/fzVMU5A/nPzbc27\nlfkJP31YzZHn5G1yH2EcByyqyYCbD4L1FbCKbehUA5cyJW90+u0f3qsWmOl2\n6GrKuN0ezPYW/6rkMCgrGBcfiFnIdcFNhS8+TTZFNqq09grdTV6AS6U38ITH\nYlNSIcIaixh6V2GGWDvh9iw/HWyj2mk0K1WZ1vbgFYC12gij5Hm+8YqZtt10\negMQzWxorftG3EOGN1B0Lv89zN3gXPBDVD/Re/kKRDQ4Fe+mQJpuiwT642Lv\nY+Dkti8B9dUVwJt8MV9dl2o6J3lkHGXzo5qDAQ0l5BG5o/6KKCLKQ9kfKnL+\nk1Qtv3ajjpFwi1ZfIQGbw8KfUCDQK7INse2J4UvoD/ver+Vny2tN+eTcqV3r\n/3+t\r\n=f5v4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEqJxRJiC5DKo0M2l1o0PK5vcsVqzxV/UfSwOqXI5vKUAiBHo0Q6wP5/VUp4iiwyBr/pIYMxgdMuQ3u2skcijXqhuQ=="}],"size":3669,"noattachment":false,"key":"/shallow-clone/-/shallow-clone-3.0.1.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shallow-clone_3.0.1_1555373202359_0.4682979114888508"},"_hasShrinkwrap":false,"readme":"# shallow-clone [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/shallow-clone.svg?style=flat)](https://www.npmjs.com/package/shallow-clone) [![NPM monthly downloads](https://img.shields.io/npm/dm/shallow-clone.svg?style=flat)](https://npmjs.org/package/shallow-clone) [![NPM total downloads](https://img.shields.io/npm/dt/shallow-clone.svg?style=flat)](https://npmjs.org/package/shallow-clone) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/shallow-clone.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/shallow-clone)\n\n> Creates a shallow clone of any JavaScript value.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save shallow-clone\n```\n\n## Usage\n\n```js\nconst clone = require('shallow-clone');\n```\n\n**Supports**\n\n* array buffers\n* arrays\n* buffers\n* dates\n* errors\n* float32 arrays\n* float64 arrays\n* int16 arrays\n* int32 arrays\n* int8 arrays\n* maps\n* objects\n* primitives\n* regular expressions\n* sets\n* symbols\n* uint16 arrays\n* uint32 arrays\n* uint8 arrays\n* uint8clamped arrays\n\n## Arrays\n\nBy default, only the array itself is cloned (shallow), use [clone-deep](https://github.com/jonschlinkert/clone-deep) if you also need the elements in the array to be cloned.\n\n```js\nconst arr = [{ a: 0 }, { b: 1 }];\nconst foo = clone(arr);\n// foo =>  [{ 'a': 0 }, { 'b': 1 }]\n\n// array is cloned\nassert(actual === expected); // false\n\n// array elements are not\nassert.deepEqual(actual[0], expected[0]); // true\n```\n\n## Objects\n\nOnly the object is shallow cloned, use [clone-deep](https://github.com/jonschlinkert/clone-deep) if you also need the values in the object to be cloned.\n\n```js\nconsole.log(clone({ a: 1, b: 2, c: 3 }));\n//=> {a: 1, b: 2, c: 3 }\n```\n\n## RegExp\n\nClones regular expressions and flags, and preserves the `.lastIndex`.\n\n```js\nconst regex = clone(/foo/g); //=> /foo/g\n// you can manually reset lastIndex if necessary\nregex.lastIndex = 0;\n```\n\n## Primitives\n\nSimply returns primitives unchanged.\n\n```js\nclone(0); //=> 0\nclone('foo'); //=> 'foo'\n```\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the values of all enumerable-own-properties and symbols from one or more source objects… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep \"Deeply assign the values of all enumerable-own-properties and symbols from one or more source objects to a target object. Returns the target object.\")\n* [clone-deep](https://www.npmjs.com/package/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. | [homepage](https://github.com/jonschlinkert/clone-deep \"Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives.\")\n* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object \"Returns true if an object was created by the `Object` constructor.\")\n* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of \"Get the native type of a value.\")\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 20 | [jonschlinkert](https://github.com/jonschlinkert) |  \n| 2  | [doowb](https://github.com/doowb) |  \n| 1  | [jakub-g](https://github.com/jakub-g) |  \n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 15, 2019._","publish_time":1555373202461,"_cnpm_publish_time":1555373202461,"dist-tags":{"latest":"3.0.1"}}