Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bevry-archive/jsonfile

Deprecated. Use https://github.com/bevry/json
https://github.com/bevry-archive/jsonfile

Last synced: about 9 hours ago
JSON representation

Deprecated. Use https://github.com/bevry/json

Awesome Lists containing this project

README

        

@bevry/jsonfile

Status of the GitHub Workflow: bevry
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.](http://master.jsonfile.bevry.surge.sh/docs/globals.html)

### Read a JSON file

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

### Write a JSON file

```typescript
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

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-es2019/index.js


  • @bevry/jsonfile/edition-es2019/index.js is TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 16 with Require for modules


  • @bevry/jsonfile/edition-es2019-esm/index.js is TypeScript compiled against ES2019 for Node.js 12 || 14 || 16 with Import for modules

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: