Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 457 Bytes

readme.md

File metadata and controls

24 lines (15 loc) · 457 Bytes

JSON Oneline Stringify

A little function for stringifying into a single line, in a readable form.

Install

npm install --save json-oneline-stringify

Usage

import stringify from 'json-oneline-stringify';

// It formats objects and arrays nicely, with spaces for readability

const input = [123, { value: 'string' }];
const output = stringify ( input ); // => '[123, { "value": "string" }]

License

MIT © Fabio Spampinato