Miss any of our Open RFC calls?Watch the recordings here! »

@bevry/jsonfile

1.1.0 • Public • Published

@bevry/jsonfile

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Read/Parse/Write a JSON file in Node.js, Deno, ESM, and CJS.

Usage

Complete API Documentation.

Read a JSON file

import readJSON from '@bevry/jsonfile'
readJSON('some/json-file.json')
    .then(console.log)
    .catch((err) => throw err)

Write a JSON file

import { writeJSON } from '@bevry/jsonfile'
writeJSON('some/json-file.json', {some: 'data'})
    .then(() => console.log('done'))
    .catch((err) => throw err)

Install

npm

  • Install: npm install --save @bevry/jsonfile
  • Import: import pkg from ('@bevry/jsonfile')
  • Require: const pkg = require('@bevry/jsonfile').default

Deno

import pkg from 'https://unpkg.com/@bevry/jsonfile@^1.1.0/edition-deno/index.ts'

Editions

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 || 14 || 15 with Require for modules
  • @bevry/jsonfile/edition-esnext-esm/index.js is TypeScript compiled against ESNext for Node.js 12 || 14 || 15 with Import for modules
  • @bevry/jsonfile/edition-deno/index.ts is TypeScript source code made to be compatible with Deno

History

Discover the release history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

License

Unless stated otherwise all works are:

and licensed under:

Install

npm i @bevry/jsonfile

DownloadsWeekly Downloads

6

Version

1.1.0

License

MIT

Unpacked Size

28.5 kB

Total Files

14

Last publish

Collaborators

  • avatar
  • avatar
  • avatar