{"name":"fast-clone","version":"1.5.12","description":"Extremely fast deep cloning function","main":"./index.js","keywords":["clone","copy","deep","object","date","fast","fastest","quick","efficient"],"author":{"name":"Ben Daniel","email":"codeandcats@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/codeandcats/fast-clone.git"},"bugs":{"url":"https://github.com/codeandcats/fast-clone/issues"},"homepage":"https://github.com/codeandcats/fast-clone#readme","types":"index.d.ts","_id":"fast-clone@1.5.12","_nodeVersion":"8.11.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-SWud/mU/aEa8/CnQ4/wTq2do0B1UpZdFmKX+qZG2KG2XVsQVxktcHMU78IYWsfZwWmI3+kDwPBnXoj8uNGAkUQ==","shasum":"3e1ba3b793c4dd2b4b5cbac98a1a80d5fba8efec","tarball":"http://registry-npm.ywwl.com/fast-clone/download/fast-clone-1.5.12.tgz","fileCount":7,"unpackedSize":11243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcg4A2CRA9TVsSAnZWagAAU7MP/0h8vMyfeFLpWtc6/FFv\nyFXpNHVbjuuZ+Drk+/bxMLcMPC5chXN9gDsV926h9DR/RzX5tIy/4W8gDl0X\nWNmIhfxpB4JShmPS9FGxehbTliDDskriOksXj/YBGbHtPD/eHgGGI7q0bRlN\nKpu2tvtbrWdKStKQcdwr4+fsimV6a6jnGjul+wCYj4IeUY5AaDKmaeUoiLIf\nzylNh/44iagJZbZEH0sV4tUVTKIq2A+zQF4Nf6nv6DGBQgsg7VoXkRR9Sin2\nt6NBd249u6kWDf+dDLiS9bLMC/N3ZLKF0SfHAfC3/ViX6Qn2CB+eRw1ySdy1\nU/4cyG2QEIrl1ikI0kIGOseHt0lZTvo0RuUYx1fbkI/z78bm++xuEpgPtK6/\n8r+tprQvGLTrWkPrtFGBSLVSJRg0RUpVmSHmcb8HMbPtdpKdOXI9oiOPkC6j\nzywtFgYIvkn7ibV2fouOODMAtnnyX8HXnnFiLNxtcavAqLWUDyCrCGb0tSdg\nvqgAyKGwE2lYo0sbKKv5DY93F5vxwZpbgZRe1/hHSgxYRf1jPU0PJf5lxnvR\nmtprvnjcFynqKVhPjPt70bxUpY6TdzHxs7ZaYNn21lniPLAdv47EGTJmM1Vg\nVbh3pye2PJx7GJkEill+Cdg/kEEFBumwSgFEu/HAt36gEmx4Xia5Fa1BfsPC\nOkoc\r\n=hbez\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDx2ZUKW/xkE2jpkoiahy80O0x2Ekz89RJtN0vBAPf4OgIgftcdgejJqmGQYt3382hLBJWZuHbS/4jnErLtaa3Mrho="}],"size":4784,"noattachment":false,"key":"/fast-clone/-/fast-clone-1.5.12.tgz"},"maintainers":[{"name":"codeandcats","email":"codeandcats@gmail.com"}],"_npmUser":{"name":"codeandcats","email":"codeandcats@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-clone_1.5.12_1552121909325_0.4601841987860804"},"_hasShrinkwrap":false,"readme":"<center>\n\t<img src=\"https://raw.githubusercontent.com/codeandcats/fast-clone/master/logo.png\" />\n</center>\n\n[![npm version](https://badge.fury.io/js/fast-clone.svg)](https://badge.fury.io/js/fast-clone)\n[![Build Status](https://travis-ci.org/codeandcats/fast-clone.svg?branch=master)](https://travis-ci.org/codeandcats/fast-clone)\n[![Coverage Status](https://coveralls.io/repos/github/codeandcats/fast-clone/badge.svg?branch=master)](https://coveralls.io/github/codeandcats/fast-clone?branch=master)\n[![Greenkeeper badge](https://badges.greenkeeper.io/codeandcats/fast-clone.svg)](https://greenkeeper.io/)\n\n\nThe ***fastest deep cloning*** function on NPM that supports the following types:\n- Objects (POJOs, null, undefined)\n- Arrays\n- Dates\n- Regular Expressions\n- Strings\n- Numbers (NaN, Positive Infinity, Negative Infinity)\n- Booleans\n\n## Speed Comparison\nAverage runtime of various NPM clone libraries on a **large** complex object loaded from json files of varying sizes ranging from 3.5 MB to 15 MB.\n\nLibrary            |    7.15 MB |\n-------------------|------------|\n✔ **fast-clone**   | **120 ms** |\n✘ deepClone        |   138 ms   |\n✘ lodash.cloneDeep |   155 ms   |\n✘ snapshot         | 1,127 ms   |\n✘ angular.copy     | 1,942 ms   |\n✘ clone            | 2,085 ms   |\n\n## Installation\n\n### NPM\n```sh\nnpm install fast-clone --save\n```\n\n### Yarn\n```sh\nyarn add fast-clone\n```\n\n## Usage\nFast-clone is a UMD module so you can use it in Node.js, or in Browser either using Browserfy/Webpack, or by using the global clone function if not using a module loader.\n\n### TypeScript\n```ts\nimport clone = require('fast-clone');\n```\n\n### JavaScript\n```js\nconst clone = require('fast-clone');\n```\n\n```ts\nconst a = {\n\tname: 'Natasha Rominov',\n\tage: 30,\n\tskills: [\n\t\t'Pistols',\n\t\t'Espionage'\n\t],\n\tdateOfBirth: new Date('1986-05-21T00:00:00.000Z')\n};\n\nconst b = clone(a);\n\nb.skills.push('That grabby thing she does with her legs');\n\nconsole.log(a.skills)\nconsole.log(b.skills);\n```\n\nOutput will be:\n```ts\n['Pistols', 'Espionage']\n['Pistols', 'Espionage', 'That grabby thing she does with her legs']\n```\n\n## Contributing\nGot an issue or a feature request? [Log it](https://github.com/codeandcats/fast-clone/issues).\n\n[Pull-requests](https://github.com/codeandcats/fast-clone/pulls) are also welcome. 😸\n","publish_time":1552121909438,"_cnpm_publish_time":1552121909438,"dist-tags":{"latest":"1.5.13"}}