json22on
v1.0.1
Published
Lightweight utilities to convert JSON <-> TOON (column-style compact notation).
Downloads
6
Maintainers
Readme
json-to-toon
Tiny utilities to convert JSON arrays into a compact TOON column-style notation and back.
Install (dev / local)
This repo is ready to publish to npm. For local testing:
npm install
npm run build
npm testExample
import { jsonToToon, toonToJson } from 'json-to-toon';
const json = {
reviews: [
{ id: 201, customer: "Rahul Shah", rating: 5, comment: "Fantastic!", verified: true }
]
};
const toon = jsonToToon(json);
console.log(toon);
const back = toonToJson(toon);
console.log(back);API
jsonToToon(json: Record<string, any>): stringtoonToJson(toon: string): Record<string, any>
Publishing
- Update
package.jsonauthor/publish fields. npm publish --access public
