{"name":"fclone","version":"1.0.1","description":"Clone objects recursively by dropping circular references","main":"dist/index.js","scripts":{"test":"_mocha","build":"gulp"},"repository":{"type":"git","url":"git+https://github.com/soyuka/fclone.git"},"keywords":["clone","deep","circular","json","stringify","json"],"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":"c492ce328ed88280d56a434f5df4f8c78a185d24","bugs":{"url":"https://github.com/soyuka/fclone/issues"},"homepage":"https://github.com/soyuka/fclone#readme","_id":"fclone@1.0.1","_shasum":"e9fc9c14c56916dda30a3d431f1ae5841089043d","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"soyuka","email":"soyuka@gmail.com"},"dist":{"shasum":"e9fc9c14c56916dda30a3d431f1ae5841089043d","tarball":"http://registry-npm.ywwl.com/fclone/download/fclone-1.0.1.tgz","integrity":"sha512-LXdI7S5fEzpqJnabBXVnlsq8PfB1r3oQQIuUjEFtY4a6gAP9tfAqquyEdjZZFLinMnWpIXwjG1Oa8UvU8y3FGw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEsVM9A9IHW7Z0LrzxiP1arswjXk0BBctof5B9kv8tsrAiA5qk5U98KAo8qyLCZU58QJTFLH80XpneeQSbujBUw6PQ=="}],"size":4449,"noattachment":false,"key":"/fclone/-/fclone-1.0.1.tgz"},"maintainers":[{"name":"soyuka","email":"soyuka@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/fclone-1.0.1.tgz_1467381152780_0.7715311103966087"},"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":1467381154800,"_cnpm_publish_time":1467381154800,"dist-tags":{"latest":"1.0.11"}}