Package Exports
- clean-yaml-object
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (clean-yaml-object) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
clean-yaml-object

Clean up an object prior to serialization.
Replaces circular references, pretty prints Buffers, and numerous other enhancements. Primarily designed to prepare Errors for serialization to JSON/YAML.
Extracted from node-tap
Install
$ npm install --save clean-yaml-object
Usage
const cleanYamlObject = require('clean-yaml-object');
cleanYamlObject(new Error('foo'));
//=> {name: 'Error', message: 'foo', stack: ...}
API
cleanYamlObject(input, [filterFn])
Returns a deep copy of input
that is suitable for serialization.
input
Type: *
Any object.
filterFn
Type: callback(propertyName, isRoot, source, target)
Optional filter callback. Returning true
will cause the property to be copied. Otherwise it will be skipped
propertyName
: The property being copied.isRoot
:true
only ifsource
is the top level object passed tocopyYamlObject
source
: The source from whichsource[propertyName]
will be copied.target
: The target object.