1.0.3 • Published 7 years ago

yamlify-object-colors v1.0.3

Weekly downloads
1,707
License
MIT
Repository
github
Last release
7 years ago

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