UNPKG

@expo/json-file

Version:

A module for reading, writing, and manipulating JSON files

30 lines (20 loc) • 533 B
<!-- 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' }); ```