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.2.1
  • 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 Command Line formatter for JSON files, zero dependencies.

Cover

Installation and Usage

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

npm i -g jason-formatter

If you use yarn:

yarn global add jason-formatter

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

You can also import it in your code:

// Good Old require
const { format } = require('jason-formatter');

// New Syntax
import { format } from 'jason-formatter';

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

You can see an example of use in test/formatter.js.

Keywords

FAQs

Package last updated on 17 Aug 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