repo
replacements.fyi

// package

jsonfile

type: "module"

// preferences

// replacements (1)

snippet::json-file

Simple or drop-in replacement

This package is no longer necessary. You can use `JSON` and `node:fs` to read and write JSON files.

// example

import * as fs from 'node:fs/promises';
fs.readFile(file, 'utf8').then(JSON.parse);
fs.writeFile(
	file,
	JSON.stringify(data, null, 2) + '\n',
);