@slimio/pretty-json
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

pretty-json

version Maintenance MIT dep size Known Vulnerabilities Build Status Greenkeeper badge

Stdout JSON in your terminal with colors. This package has been created to stdout clean and beautiful JSON in the SlimIO CLI.

Requirements

Getting Started

This package is available in the Node Package Repository and can be easily installed with npm or yarn.

$ npm i @slimio/pretty-json
# or
$ yarn add @slimio/pretty-json

Usage example

const prettyJSON = require("@slimio/pretty-json");

prettyJSON({
    foo: "bar",
    hello: "world!",
    arr: [1, 2, 3]
});

It will produce the following stdout:

stdout

API

prettyJSON(obj: object): void

Stdout a given JSON Object (Plain Object, Objects Prototype of Object or Array).

Dependencies

Name Refactoring Security Risk Usage
@slimio/is Minor Low Type checker
kleur Minor Low TTY color

License

MIT

Package Sidebar

Install

npm i @slimio/pretty-json

Weekly Downloads

29

Version

1.3.0

License

MIT

Unpacked Size

9.56 kB

Total Files

6

Last publish

Collaborators

  • fraxken
  • alexandre.malaj