npm.io
1.0.3 • Published 9 years ago

yamlify-object-colors

Licence
MIT
Version
1.0.3
Deps
1
Vulns
0
Weekly
0

yamlify-object-colors

Colors preset for yamlify-object package

Install

npm install yamlify-object-colors

Usage

const yamlifyObject = require('yamlify-object');
const yamlifyColors = require('yamlify-object-colors');

const obj = {
  object: {
    number: 1,
    error: new Error('message'),
    date: new Date(0),
    symbol: Symbol('SYMBOL'),
    string: 'string value',
    boolean: true,
    null: null,
    undefined: undefined,
  }
}

const formattedString = yamlifyObject(obj, {
  colors: yamlifyColors,
});

console.log(formattedString);

Example

Object example

Keywords