Read/Parse/Write a JSON file in Node.js, Deno, ESM, and CJS.
import readJSON from '@bevry/jsonfile'
readJSON('some/json-file.json')
.then(console.log)
.catch((err) => throw err)
import { writeJSON } from '@bevry/jsonfile'
writeJSON('some/json-file.json', {some: 'data'})
.then(() => console.log('done'))
.catch((err) => throw err)
npm install --save @bevry/jsonfile
import pkg from ('@bevry/jsonfile')
const pkg = require('@bevry/jsonfile').default
import pkg from 'https://unpkg.com/@bevry/jsonfile@^1.0.0/edition-deno/index.ts'
This package is published with the following editions:
@bevry/jsonfile/source/index.ts
is TypeScript source code with Import for modules@bevry/jsonfile
aliases @bevry/jsonfile/edition-esnext/index.js
@bevry/jsonfile/edition-esnext/index.js
is TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules@bevry/jsonfile/edition-esnext-esm/index.js
is TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules@bevry/jsonfile/edition-deno/index.ts
is TypeScript source code made to be compatible with DenoDiscover the release history by heading on over to the HISTORY.md
file.
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
These amazing people are maintaining this project:
Author: bevry
Source Code: https://github.com/bevry/jsonfile
#nodejs #node #javascript