Skip to the content.

Jason Formatter

Code Coverage Deno Doc

A simple JSON formatter.

CLI

Install

deno install --unstable --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, to specify how many tabs you want πŸ‘‡

jason config.json --tabs 4 # same as -t 4

Video Showcase πŸ“·

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 star the repo ⭐

Versioning

We use Semantic Versioning. For the versions available, see the tags 🏷️

Licence

Licensed under the MIT License πŸ“„