diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
commit | cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch) | |
tree | 92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/clean-yaml-object/readme.md | |
parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) |
remove node_modules
Diffstat (limited to 'node_modules/clean-yaml-object/readme.md')
-rw-r--r-- | node_modules/clean-yaml-object/readme.md | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/node_modules/clean-yaml-object/readme.md b/node_modules/clean-yaml-object/readme.md deleted file mode 100644 index 4e4e5a67b..000000000 --- a/node_modules/clean-yaml-object/readme.md +++ /dev/null @@ -1,52 +0,0 @@ -# clean-yaml-object [](https://travis-ci.org/tapjs/clean-yaml-object) [](https://coveralls.io/github/tapjs/clean-yaml-object?branch=master) - -> 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`](https://github.com/tapjs/node-tap) - -## Install - -``` -$ npm install --save clean-yaml-object -``` - - -## Usage - -```js -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 if `source` is the top level object passed to `copyYamlObject` -- `source`: The source from which `source[propertyName]` will be copied. -- `target`: The target object. - -## License - - -MIT © [Isaac Z. Schlueter](http://github.com/isaacs) [James Talmage](http://github.com/jamestalmage) |