1.6.15 • Published 2 years ago
json-fixer v1.6.15
json-fixer
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):
This project follows the all-contributors specification. Contributions of any kind welcome!
1.6.15
2 years ago
1.6.14
2 years ago
1.6.13
2 years ago
1.6.12
3 years ago
1.6.11
3 years ago
1.6.10
3 years ago
1.6.9
3 years ago
1.6.8
3 years ago
1.6.7
3 years ago
1.6.6
3 years ago
1.6.5
4 years ago
1.6.4
4 years ago
1.6.3
4 years ago
1.6.2
4 years ago
1.6.1
4 years ago
1.6.0
4 years ago
1.5.4
4 years ago
1.5.3
4 years ago
1.5.2
4 years ago
1.5.1
4 years ago
1.5.0
4 years ago
1.4.3
4 years ago
1.4.2
4 years ago
1.4.1
4 years ago
1.4.0
4 years ago
1.3.3
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.1-0
5 years ago
1.3.0
5 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.0
5 years ago