@expo/json-file
Version:
A module for reading, writing, and manipulating JSON files
30 lines (20 loc) ⢠533 B
Markdown
<!-- Title -->
<h1 align="center">
š Welcome to <br><code>@expo/json-file</code>
</h1>
<p align="center">A library for reading and writing JSON files.</p>
<!-- Body -->
## š Setup
Install `@expo/json-file` in your project.
```sh
yarn add @expo/json-file
```
## ā½ļø Usage
```ts
import JsonFile, { JSONObject } from '@expo/json-file';
// Create a file instance
const jsonFile = new JsonFile<JSONObject>(filePath);
// Interact with the file
await jsonFile.readAsync();
await jsonFile.writeAsync({ some: 'data' });
```