Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jason-formatter

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jason-formatter

A Command Line tool to format JSON

  • 1.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

Jason

GitMoji License: MIT Lines Of Code CodeQL Eslint

A simple json formmater.

Cover

Installation

To be able to use it in your entire system you have to install globally:

npm i -g jason

If you use yarn:

yarn global add jason

Usage

Now you can use it anywhere on your system:

jason config.json

By default, 2 tabs are used, but you can also specify how many tabs you want:

jason config.json 4

Jason is also a library, so you can also import it in your code.

Example using CommonJS:

const jason = require('jason-formatter').default

const rawData = `
{

  "hey":9   ,
  "jason":true
}

`

console.log(jason(rawData, { tabs: 2 }))

Examples using ES6 or Typescript:

import jason from 'jason-formatter'

const rawData = `
{

  "hey":9   ,
  "jason":true
}

`

console.log(jason(rawData, { tabs: 2 }))

Keywords

FAQs

Package last updated on 12 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc