JSPM

yamlify-object-colors

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1529
  • Score
    100M100P100Q117378F
  • License MIT

Colors preset for yamlify-object

Package Exports

  • yamlify-object-colors

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 (yamlify-object-colors) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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