Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bevry-archive/jsonfile
- Owner: bevry-archive
- License: other
- Created: 2020-09-12T03:22:21.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-08T06:01:49.000Z (almost 2 years ago)
- Last Synced: 2024-04-08T15:41:59.223Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 428 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
@bevry/jsonfile
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
- 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?
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:
- Copyright © 2020+ Benjamin Lupton
and licensed under: