JSON Utils
Installation
Section titled “Installation”pnpm add @theholocron/json-utilsimport { stringifyJson } from "@theholocron/json-utils";
stringifyJson({ a: 1 }); // '{\n "a": 1\n}\n'
// rewrite a file without reformatting itconst original = await readFile("package.json", "utf8");const pkg = JSON.parse(original);pkg.version = "2.0.0";await writeFile("package.json", stringifyJson(pkg, { like: original }));The full API reference is generated from the package’s TSDoc comments.