Socket
Socket
Sign inDemoInstall

json-fixer

Package Overview
Dependencies
9
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    json-fixer

A JSON fixer


Version published
Weekly downloads
83K
decreased by-6.42%
Maintainers
1
Install size
759 kB
Created
Weekly downloads
 

Changelog

Source

1.6.15 (2022-09-06)

Bug Fixes

  • upgrade @babel/runtime from 7.17.9 to 7.18.9 (85d95e5)

Readme

Source

json-fixer

NPM

GitHub package version devDependencies Status dependencies Status

GH Downloads GitHub commit activity the past year GitHub contributors Github search hit counter

Build Status codecov.io Code Coverage tested with jest Known Vulnerabilities

GitHub contributions welcome Commitizen friendly

GitHub top language GitHub language count GitHub code size in bytes

BCH compliance Codacy Badge

A JSON file fixer primarly focused to be used in a NodeJS file.

Usage

  • In NodeJS
const jsonFix = require('json-fixer')
const fs = require('fs')

// Get the (potentially malformed) JSON data ready
const jsonContent = fs.readFileSync('config.json', 'utf-8')

const {data, changed} = jsonFix(jsonContent) // Lint (and fix) it

if (changed) {
  // Do something with `data` which is the fixed JSON parsed data from `jsonContent`
  // e.g. `fs.writeFileSync(configPath, JSON.stringify(data, null, 2))`
}
  • In the CLI
    Not supported yet (PR welcome).

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Maximilian Berkmann

💻 📖 🤔 🚧 ⚠️ 🛡️

Semantic Release Bot

📦 📖

all-contributors[bot]

📖

Ben Kucera

💻

Svetozar Mateev

🐛 💻

André Paulo

🐛

Erkin Matkaziev

🐛

Codacy Badger

🚇 📖

GiraffeKey

💻 ⚠️

jonasmaertens

🐛

George Tsotsos

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

FAQs

Last updated on 06 Sep 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc