UNPKG

533 BMarkdownView Raw
1<!-- Title -->
2<h1 align="center">
3👋 Welcome to <br><code>@expo/json-file</code>
4</h1>
5
6<p align="center">A library for reading and writing JSON files.</p>
7
8<!-- Body -->
9
10## 🏁 Setup
11
12Install `@expo/json-file` in your project.
13
14```sh
15yarn add @expo/json-file
16```
17
18## ⚽️ Usage
19
20```ts
21import JsonFile, { JSONObject } from '@expo/json-file';
22
23// Create a file instance
24const jsonFile = new JsonFile<JSONObject>(filePath);
25
26// Interact with the file
27await jsonFile.readAsync();
28await jsonFile.writeAsync({ some: 'data' });
29```