{"name":"fclone","version":"1.0.7","description":"Fastest JSON cloning module that handles circular references","main":"dist/fclone.js","scripts":{"test":"_mocha","build":"gulp"},"repository":{"type":"git","url":"git+https://github.com/soyuka/fclone.git"},"keywords":["clone","deep","circular","json","stringify","fast"],"author":{"name":"soyuka","email":"soyuka@gmail.com"},"license":"MIT","devDependencies":{"babel-preset-es2015":"^6.9.0","chai":"^3.5.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-rename":"^1.2.2","gulp-uglify":"^1.5.4","gulp-wrap":"^0.13.0","mocha":"^2.5.3"},"gitHead":"cc48e936cd58d19b6ccda4481e74aba1b608ccca","bugs":{"url":"https://github.com/soyuka/fclone/issues"},"homepage":"https://github.com/soyuka/fclone#readme","_id":"fclone@1.0.7","_shasum":"5c26e3e85be483f9f7099c3a07deb8be7c00cfcd","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"soyuka","email":"soyuka@gmail.com"},"dist":{"shasum":"5c26e3e85be483f9f7099c3a07deb8be7c00cfcd","tarball":"http://registry-npm.ywwl.com/fclone/download/fclone-1.0.7.tgz","integrity":"sha512-5KQq3i7N9QbMyRt7z3/IEOULyMpSn2P1gOV8epGB7Ix+2OHhXLS+4Q95t1xnpzOVxRdAEjFEjHP6T7bcvAqOKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxNy2lxUUSpagyaTgPLSkstKz9+7+dBGwuDYfIv+ZhfwIhAMqktQW+Hj3yAyMLWpLYJ6bldHw7aZ1B1Wdx8uhoPfiv"}],"size":4131,"noattachment":false,"key":"/fclone/-/fclone-1.0.7.tgz"},"maintainers":[{"name":"soyuka","email":"soyuka@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/fclone-1.0.7.tgz_1467648392678_0.9462046939879656"},"directories":{},"readme":"# FClone\n\nClone objects by dropping circular references \n\n[![Build Status](https://travis-ci.org/soyuka/fclone.svg?branch=master)](https://travis-ci.org/soyuka/fclone)\n\nThis module clones a Javascript object in safe mode (eg: drops circular values) recursively. Circular values are replaced with a string: `'[Circular]'`.\n\nIdeas from [tracker1/safe-clone-deep](https://github.com/tracker1/safe-clone-deep). I improved the workflow a bit by:\n- refactoring the code (complete rewrite)\n- fixing node 6+\n- micro optimizations\n- use of `Array.isArray` and `Buffer.isBuffer`\n\nNode 0.10 compatible, distributed files are translated to es2015.\n\n## Installation\n\n```bash\nnpm install fclone\n# or\nbower install fclone\n```\n\n## Usage\n\n```javascript\nconst fclone = require('fclone');\n\nlet a = {c: 'hello'};\na.b = a;\n\nlet o = fclone(a);\n\nconsole.log(o);\n// outputs: { c: 'hello', b: '[Circular]' }\n\n//JSON.stringify is now safe\nconsole.log(JSON.stringify(o));\n```\n\n## Benchmarks\n\nSome benchs:\n\n```\nfclone x 17,081 ops/sec ±0.71% (79 runs sampled)\nfclone + json.stringify x 9,433 ops/sec ±0.91% (81 runs sampled)\nutil.inspect (outputs a string) x 2,498 ops/sec ±0.77% (90 runs sampled)\njsan x 5,379 ops/sec ±0.82% (91 runs sampled)\ncircularjson x 4,719 ops/sec ±1.16% (91 runs sampled)\ndeepcopy x 5,478 ops/sec ±0.77% (86 runs sampled)\njson-stringify-safe x 5,828 ops/sec ±1.30% (84 runs sampled)\nclone x 8,713 ops/sec ±0.68% (88 runs sampled)\nFastest is util.format (outputs a string)\n```\n","publish_time":1467648395182,"_cnpm_publish_time":1467648395182,"dist-tags":{"latest":"1.0.11"}}