lib/styled.js
function styledJSON (obj) {
  let json = JSON.stringify(obj, null, 2)
  if (cli.color.enabled) {
    let cardinal = require('cardinal')
    let theme = require('cardinal/themes/jq')
    cli.log(cardinal.highlight(json, {json: true, theme: theme}))
  } else {
    cli.log(json)
  }
}
function styledJSON (obj) {
  let json = JSON.stringify(obj, null, 2)
  if (cli.color.enabled) {
    let cardinal = require('cardinal')
    let theme = require('cardinal/themes/jq')
    cli.log(cardinal.highlight(json, {json: true, theme: theme}))
  } else {
    cli.log(json)
  }
}
function styledJSON ( obj ) { let json = JSON . stringify ( obj , null , 2 ) if ( cli . color . enabled ) { let cardinal = require ( 'cardinal' ) let theme = require ( 'cardinal/themes/jq' ) cli . log ( cardinal . highlight ( json , { json : true , theme : theme } ) ) } else { cli . log ( json ) } }
styledJSON prints out colored, indented JSON

@example
styledHeader({foo: 'bar'}) # Outputs === {
"foo": "bar"
}

@param {obj} object data to display
@returns {null}
styledJSON prints out colored indented JSON