{"name":"fast-clone","version":"1.5.3","description":"Extremely fast deep cloning function","main":"./index.js","scripts":{"benchmark":"ts-node benchmark","build":"tsc -p ./","clean":"rimraf index.js","prepublish":"npm run clean && npm run build","test":"mocha -r ts-node/register tests/**/*.test.ts"},"keywords":["clone","copy","deep","object","date","fast","fastest","quick","speed"],"author":{"name":"Ben","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","devDependencies":{"@types/chai":"4.1.2","@types/mocha":"2.2.48","@types/node":"9.4.7","angular":"1.5.11","benv":"3.3.0","chai":"3.5.0","chalk":"1.1.3","clone":"1.0.3","deepclone":"1.0.2","deepcopy":"0.6.3","faker":"3.1.0","filesize":"3.3.0","lodash":"4.12.0","mocha":"5.0.4","numeral":"1.5.6","pad":"1.0.3","rimraf":"2.6.2","snapshot":"0.0.0","ts-node":"5.0.1","typescript":"2.7.2"},"gitHead":"1d7b586fa00d2c27a49523a3f2814f7774f97baf","_id":"fast-clone@1.5.3","_npmVersion":"5.8.0","_nodeVersion":"8.6.0","_npmUser":{"name":"codeandcats","email":"codeandcats@gmail.com"},"dist":{"integrity":"sha512-o+FDnlwswtBJqisjSmHdyMVcPZCZYTX7sBHTBLYQKYSiwp8QlFfU/ucSsnbDzdMTrRwzaIXuD+EXIFWIvga1uQ==","shasum":"2faa7a825054e9fc8be5024fb09a266ed2cd9fe7","tarball":"http://registry-npm.ywwl.com/fast-clone/download/fast-clone-1.5.3.tgz","fileCount":13,"unpackedSize":18848,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGz8Wa99HNMkA9C6y3SdJ/a0gJiCYYwZEDlurum42tIDAiBPXZ5/xT0I7SHxUEy0qJ7a4hlz2kVDElqDoEX3bLQuEw=="}],"size":5972,"noattachment":false,"key":"/fast-clone/-/fast-clone-1.5.3.tgz"},"maintainers":[{"name":"codeandcats","email":"codeandcats@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-clone_1.5.3_1523082728309_0.9723545930353079"},"_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":1523082728356,"_cnpm_publish_time":1523082728356,"dist-tags":{"latest":"1.5.13"}}