{"maintainers":[{"name":"jamestalmage","email":"james@talmage.io"}],"keywords":["serialize","clean","dedupe","circular","yaml","json","error"],"dist-tags":{"latest":"0.1.0"},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/jamestalmage"},"description":"Clean up an object prior to serialization","readme":"# clean-yaml-object [![Build Status](https://travis-ci.org/tapjs/clean-yaml-object.svg?branch=master)](https://travis-ci.org/tapjs/clean-yaml-object) [![Coverage Status](https://coveralls.io/repos/tapjs/clean-yaml-object/badge.svg?branch=master&service=github)](https://coveralls.io/github/tapjs/clean-yaml-object?branch=master)\n\n> Clean up an object prior to serialization.\n\nReplaces circular references, pretty prints Buffers, and numerous other enhancements. Primarily designed to prepare Errors for serialization to JSON/YAML.\n\nExtracted from [`node-tap`](https://github.com/tapjs/node-tap)\n\n## Install\n\n```\n$ npm install --save clean-yaml-object\n```\n\n\n## Usage\n\n```js\nconst cleanYamlObject = require('clean-yaml-object');\n\ncleanYamlObject(new Error('foo'));\n//=> {name: 'Error', message: 'foo', stack: ...}\n```\n\n\n## API\n\n### cleanYamlObject(input, [filterFn])\n\nReturns a deep copy of `input` that is suitable for serialization. \n\n#### input\n\nType: `*`\n\nAny object.\n\n#### filterFn\n\nType: `callback(propertyName, isRoot, source, target)`\n\nOptional filter callback. Returning `true` will cause the property to be copied. Otherwise it will be skipped\n\n- `propertyName`: The property being copied.\n- `isRoot`: `true` only if `source` is the top level object passed to `copyYamlObject`\n- `source`: The source from which `source[propertyName]` will be copied.\n- `target`: The target object.\n\n## License\n\n\nMIT © [Isaac Z. Schlueter](http://github.com/isaacs) [James Talmage](http://github.com/jamestalmage)\n","repository":{"type":"git","url":"git+https://github.com/tapjs/clean-yaml-object.git"},"bugs":{"url":"https://github.com/tapjs/clean-yaml-object/issues"},"license":"MIT","versions":{"0.0.1":{"name":"clean-yaml-object","version":"0.0.1","description":"My flawless module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/jamestalmage/clean-yaml-object.git"},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/jamestalmage"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc --cache --reporter=lcov --reporter=text ava"},"files":["index.js"],"keywords":[],"dependencies":{},"devDependencies":{"ava":"^0.10.0","nyc":"^5.3.0","xo":"^0.12.1"},"gitHead":"08bdab8163ec8c7b506c2e410e1fb1de7d6a7c86","bugs":{"url":"https://github.com/jamestalmage/clean-yaml-object/issues"},"homepage":"https://github.com/jamestalmage/clean-yaml-object#readme","_id":"clean-yaml-object@0.0.1","_shasum":"f48ed1af1b2fdba05584544c07c3cdc6c1ad3a38","_from":".","_npmVersion":"3.4.0","_nodeVersion":"0.10.40","_npmUser":{"name":"jamestalmage","email":"james@talmage.io"},"dist":{"shasum":"f48ed1af1b2fdba05584544c07c3cdc6c1ad3a38","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/clean-yaml-object/-/clean-yaml-object-0.0.1.tgz"},"maintainers":[{"name":"jamestalmage","email":"james@talmage.io"}],"directories":{}},"0.1.0":{"name":"clean-yaml-object","version":"0.1.0","description":"Clean up an object prior to serialization","license":"MIT","repository":{"type":"git","url":"git+https://github.com/tapjs/clean-yaml-object.git"},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/jamestalmage"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc --cache --reporter=lcov --reporter=text ava"},"files":["index.js"],"keywords":["serialize","clean","dedupe","circular","yaml","json","error"],"dependencies":{},"devDependencies":{"ava":"^0.10.0","coveralls":"^2.11.6","nyc":"^5.3.0","xo":"^0.12.1"},"gitHead":"37e3fd40076d7e6f92b9ca9a09a4cf600e6bac24","bugs":{"url":"https://github.com/tapjs/clean-yaml-object/issues"},"homepage":"https://github.com/tapjs/clean-yaml-object#readme","_id":"clean-yaml-object@0.1.0","_shasum":"63fb110dc2ce1a84dc21f6d9334876d010ae8b68","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.3.0","_npmUser":{"name":"jamestalmage","email":"james@talmage.io"},"dist":{"shasum":"63fb110dc2ce1a84dc21f6d9334876d010ae8b68","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz"},"maintainers":[{"name":"jamestalmage","email":"james@talmage.io"}],"directories":{}}},"name":"clean-yaml-object","time":{"modified":"2016-01-16T06:20:58.159Z","created":"2016-01-16T03:51:55.398Z","0.0.1":"2016-01-16T03:51:55.398Z","0.1.0":"2016-01-16T06:20:58.159Z"},"readmeFilename":"readme.md","homepage":"https://github.com/tapjs/clean-yaml-object#readme"}