{"_id":"clean-yaml-object","_rev":"7-cc5e23c5fa15dad062712d7cc0555dcb","name":"clean-yaml-object","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"clean-yaml-object","version":"0.0.1","keywords":[],"author":{"url":"github.com/jamestalmage","name":"James Talmage","email":"james@talmage.io"},"license":"MIT","_id":"clean-yaml-object@0.0.1","maintainers":[{"name":"jamestalmage","email":"james@talmage.io"}],"homepage":"https://github.com/jamestalmage/clean-yaml-object#readme","bugs":{"url":"https://github.com/jamestalmage/clean-yaml-object/issues"},"dist":{"shasum":"f48ed1af1b2fdba05584544c07c3cdc6c1ad3a38","tarball":"https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.0.1.tgz","integrity":"sha512-vi8Ft4LLRs7BFo0NHZ74tFJswUaaxXzdVYIwdwfkyqINEnFWaxJAPNBx/Dmj+6DhewjltNPNdBnUlILmuInDIA==","signatures":[{"sig":"MEUCIF0tPWN71qK1QoTnuscfLFlNdkJBY3prNneotziTydG2AiEA3IoHEDB6b+bRKi5WfAMQQ9ujzsMv6gAWwND8dplrp74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","files":["index.js"],"_shasum":"f48ed1af1b2fdba05584544c07c3cdc6c1ad3a38","engines":{"node":">=0.10.0"},"gitHead":"08bdab8163ec8c7b506c2e410e1fb1de7d6a7c86","scripts":{"test":"xo && nyc --cache --reporter=lcov --reporter=text ava"},"_npmUser":{"name":"jamestalmage","email":"james@talmage.io"},"repository":{"url":"git+https://github.com/jamestalmage/clean-yaml-object.git","type":"git"},"_npmVersion":"3.4.0","description":"My flawless module","directories":{},"_nodeVersion":"0.10.40","dependencies":{},"devDependencies":{"xo":"^0.12.1","ava":"^0.10.0","nyc":"^5.3.0"}},"0.1.0":{"name":"clean-yaml-object","version":"0.1.0","keywords":["serialize","clean","dedupe","circular","yaml","json","error"],"author":{"url":"github.com/jamestalmage","name":"James Talmage","email":"james@talmage.io"},"license":"MIT","_id":"clean-yaml-object@0.1.0","maintainers":[{"name":"jamestalmage","email":"james@talmage.io"}],"homepage":"https://github.com/tapjs/clean-yaml-object#readme","bugs":{"url":"https://github.com/tapjs/clean-yaml-object/issues"},"dist":{"shasum":"63fb110dc2ce1a84dc21f6d9334876d010ae8b68","tarball":"https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz","integrity":"sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==","signatures":[{"sig":"MEUCIQCUCcWbu56aCPQok+5X0r8NOMMG4f+ak3TPih2xKhiE3AIgO/Q3dp53O2uZMJjU83yMeu02/+nSpQIlSv+NOciSY68=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","files":["index.js"],"_shasum":"63fb110dc2ce1a84dc21f6d9334876d010ae8b68","engines":{"node":">=0.10.0"},"gitHead":"37e3fd40076d7e6f92b9ca9a09a4cf600e6bac24","scripts":{"test":"xo && nyc --cache --reporter=lcov --reporter=text ava"},"_npmUser":{"name":"jamestalmage","email":"james@talmage.io"},"repository":{"url":"git+https://github.com/tapjs/clean-yaml-object.git","type":"git"},"_npmVersion":"3.5.3","description":"Clean up an object prior to serialization","directories":{},"_nodeVersion":"5.3.0","dependencies":{},"devDependencies":{"xo":"^0.12.1","ava":"^0.10.0","nyc":"^5.3.0","coveralls":"^2.11.6"}},"1.0.0":{"name":"clean-yaml-object","version":"1.0.0","description":"Clean up an object prior to serialization","repository":{"type":"git","url":"git+https://github.com/tapjs/clean-yaml-object.git"},"engines":{"node":">=18"},"scripts":{"preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","format":"prettier --write . --log-level warn","typedoc":"typedoc --tsconfig .tshy/esm.json"},"dependencies":{"@isaacs/buffer-to-string":"^1.0.1"},"devDependencies":{"prettier":"^3.6.2","tap":"^21.1.3","tshy":"^3.0.3","typedoc":"^0.28.14"},"type":"module","tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","_id":"clean-yaml-object@1.0.0","gitHead":"3c9870bba4fdbaf480c8df1cd3d61a94faf2665e","bugs":{"url":"https://github.com/tapjs/clean-yaml-object/issues"},"homepage":"https://github.com/tapjs/clean-yaml-object#readme","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-qwoXwJFfhpEAiRaN/Rl+wKB3DFEKWGDp05P7uuUx4iGP7nVedGVIhdiIrWH7cGXcqmHUQSeNPnQRy4udENrMvw==","shasum":"8b31fd1a4341e5cef33482c409a0cf1344421908","tarball":"https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-1.0.0.tgz","fileCount":3,"unpackedSize":3999,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIADw8nnlVmCLyJ1C7fOztD/h4Px+B6GHDunHaZLsW/nEAiA1W+m2CP8YUgacGiAlav7o8NkkkQ6SAKQqD37slORuHg=="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"jamestalmage","email":"james@talmage.io"},{"name":"isaacs","email":"i@izs.me"},{"name":"bcoe","email":"bencoe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clean-yaml-object_1.0.0_1762046873924_0.06744671507865774"},"_hasShrinkwrap":false}},"time":{"created":"2016-01-16T03:51:55.398Z","modified":"2025-11-02T01:27:54.279Z","0.0.1":"2016-01-16T03:51:55.398Z","0.1.0":"2016-01-16T06:20:58.159Z","1.0.0":"2025-11-02T01:27:54.093Z"},"bugs":{"url":"https://github.com/tapjs/clean-yaml-object/issues"},"homepage":"https://github.com/tapjs/clean-yaml-object#readme","repository":{"type":"git","url":"git+https://github.com/tapjs/clean-yaml-object.git"},"description":"Clean up an object prior to serialization","maintainers":[{"name":"jamestalmage","email":"james@talmage.io"},{"name":"isaacs","email":"i@izs.me"},{"name":"bcoe","email":"bencoe@gmail.com"}],"readme":"# clean-yaml-object\n\n> Clean up an object prior to serialization.\n\nReplaces circular references, pretty prints Buffers, and numerous\nother enhancements. Primarily designed to prepare Errors for\nserialization to JSON/YAML.\n\nExtracted from [`node-tap`](https://github.com/tapjs/node-tap)\n\n## Usage\n\n```ts\nimport { cleanYamlObject } from 'clean-yaml-object'\n// or: const { cleanYamlObject } = require('clean-yaml-object')\n\ncleanYamlObject(new Error('foo'))\n//=> {name: 'Error', message: 'foo', stack: ...}\n```\n\n## API\n\n### cleanYamlObject(input, [filterFn])\n\nReturns a deep copy of `input` that is suitable for\nserialization.\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\nproperty 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\n  passed to `copyYamlObject`\n- `source`: The source from which `source[propertyName]` will be\n  copied.\n- `target`: The target object.\n","readmeFilename":"readme.md"}