{"name":"fclone","version":"1.0.4","description":"Clone objects recursively by dropping 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","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":"05d398f73e6901ad1702cfef6c1e4927fd4de547","bugs":{"url":"https://github.com/soyuka/fclone/issues"},"homepage":"https://github.com/soyuka/fclone#readme","_id":"fclone@1.0.4","_shasum":"c2adc4d0488d8fccd2b2b629a6b316c8068789bd","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"soyuka","email":"soyuka@gmail.com"},"dist":{"shasum":"c2adc4d0488d8fccd2b2b629a6b316c8068789bd","tarball":"http://registry-npm.ywwl.com/fclone/download/fclone-1.0.4.tgz","integrity":"sha512-/yy1zB7KcBO4jw0bwsb+FGLI6YJughQxTwXIY+lIChoohkdcxo38wlKFD1GErsYISbRJVcjHZsG4LEzirEk+lA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2ZHIZVY6bV03fMs3WWwUIwq0V/mcUkNCVdf8wzjKVyAiEAp+u1v+yGrvdA1NTbt2KQhtE0MTwmHsWmL0xpdly1XmA="}],"size":3319,"noattachment":false,"key":"/fclone/-/fclone-1.0.4.tgz"},"maintainers":[{"name":"soyuka","email":"soyuka@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/fclone-1.0.4.tgz_1467457268559_0.44633378158323467"},"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":1467457270602,"_cnpm_publish_time":1467457270602,"dist-tags":{"latest":"1.0.11"}}