v2.2.0
π Shell utility and Library for formatting JSON files
Repository
Current version released
3 years ago
Versions
Jason Formatter
A simple JSON formatter.
CLI
Install
- Deno π
deno install --unstable --allow-read --allow-write https://deno.land/x/jason_formatter/jason.ts
- Node.js πΌ
npm install --global jason-formatter
Usage
jason config.json
By default, 2 tabs are used, to specify how many tabs you want π
jason config.json --tabs 4 # same as -t 4
Usage
The API is the same on all this platforms βοΈ
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 π
You can use any CDN π₯
Eg π ESM βοΈ SkyPack π Script Tag βοΈ JSDelivr
Documentation
Is hosted on Deno Doc π
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 β
Versioning
We use Semantic Versioning. For the versions available, see the tags π·οΈ
Licence
Licensed under the MIT License π