{"name":"fast-clone","version":"1.5.6","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.6","_nodeVersion":"8.11.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-yz5zQFg/mgtPxX0MFWllg2bj/At7Zqq3zt2lBJV8tOtQIWObLLHi/wmvRy2HhyWhBzSixSf1ljdyMBC6itRJEA==","shasum":"3744ed44fdad9eeca13a004ed35bd68af49d5738","tarball":"http://registry-npm.ywwl.com/fast-clone/download/fast-clone-1.5.6.tgz","fileCount":7,"unpackedSize":11242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcg0s9CRA9TVsSAnZWagAALhAQAI/UnHN3AL5Vcv02+oVb\nKhzrdqUdLXwfn0OaB8L9/Ybfjgd2uHuhJDC1GC4IvnmFhxiQjNBos4BPtnCe\nYh4CMEpDs9BFkbauY7V+qVMt3mirFD1Q/hRgXIODrfXZv28l4uahVo4yMISZ\nLHIgkV41I28ezvLURH4q5emD9Q6BSsh5V+v0bspRdhKCsRafybs3UrOxeujA\nCkO6DC7h6sNi7ijSLgrXVQaIp2lCu4qcnLhpL+zwk+QaJVGlOzv2nXU5rFtO\nTQtuVcfZRbEXcWn0gh0aI4X65C9b2hr3BTzPIfhmgJ6D3wOcThc3EVR6r9Lc\nQGzgrjCpXJfrLj6XeyiRGbXK1d/fWU4WFWhcffJNSL42nuN6FQsknA6PPEd1\nohdWXhDmAaPNyMJmMBQeGKa926q7jUP/0w0M+w1GsW5Z2HB0YsE/yHydfdUD\n88XI1XcxhHpXufhra46y2u8NVaL5okoK0f2q6tekZYLyA4K6eorln1mDCrE+\nVI3AYPSCJePqV8rsfWPYNAY4CecEqai8RFPOPjhd8qMdGztNaceeg0mhFO2W\nqeuPOdXWDNVS1ZqdSKXBY0e6ycbUTAUhH4UpvF5btmmyixAiCLCMI+ScdMi5\nIayunuoAyBcT3H8B2JWV5+KeUk3yqZfrTenvISdACaCLGHMAEy+t0o4uLz37\n/Ce0\r\n=kDGd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE8EvXEyukAYnnEvHdbHdE6cgm5UA2OC8GzoMRz4QXxGAiA+/GJn4qb6d7J6mzG8ne9eqNd0CV3EUU2LaF4da/7rOw=="}],"size":4784,"noattachment":false,"key":"/fast-clone/-/fast-clone-1.5.6.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.6_1552108348612_0.6616134229709254"},"_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":1552108348747,"_cnpm_publish_time":1552108348747,"dist-tags":{"latest":"1.5.13"}}