UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

10 lines (9 loc) 318 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.prettyOneLine = void 0; const prettyOneLine = (value) => { let json = JSON.stringify(value); json = json.replace(/([\{\[\:\,])/g, '$1 ').replace(/([\}\]])/g, ' $1'); return json; }; exports.prettyOneLine = prettyOneLine;