v2.0.1
π Shell utility and Library for formatting JSON files
Repository
Current version released
2 years ago
Versions
Jason Formatter
A simple JSON formatter.
CLI
Install
deno install --allow-read --allow-write https://deno.land/x/jason_formatter/jason.ts
npm install --global jason-formatter
Usage
jason config.json
By default, 2 tabs are used, but you can also specify how many tabs you want π
jason config.json --tabs 4 # same as -t 4
Usage
Deno π
import { jason } from "https://deno.land/x/jason_formatter/mod.ts";
const data = `{"nick":9}`;
jason(data); /* {
"nick": 9
}*/
Node.js π’
import { jason } from "jason-formatter";
Browser
Using type module π±
Using a plain script tag π
You have the same API on all of this platforms.
Documentation
Autogenerated Documentation π
Note
I did this while learning TypeScript long time ago, It was originally written for Node.js but Iβm porting most of my packages to Deno.
Itβs basically a wrapper around JSON.stringify π
Support
Open an Issue, I will check it a soon as possible π
If you want to hurry me up a bit send me a tweet π
Consider supporting me on Patreon if you like my work π
Donβt forget to start the repo β
Licence
Licensed under the MIT License.