console-json

1.1.0 • Public • Published

console-json

npm package

To lazy to type JSON.stringify(obj, null, indent) try console.json(obj)

Console JSON Logo

Logo designed by Liffy Designs

Usage

Install

npm i console-json -S

or

yarn add console-json

Use

import console-json; // or require('console-json');

const myObj = {
    foo: 'bar'
}
console.json(myObj);

/**
{
    foo: 'bar'
}
**/

Indent

Optional indent can be passed to console.json, defaults to 4.

console.json(myObj, 2);

/console-json/

    Package Sidebar

    Install

    npm i console-json

    Weekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    1.83 kB

    Total Files

    4

    Last publish

    Collaborators

    • chrislaughlin