@unmilley/deep-parse-json
v1.0.0
Published
Recursively parses a JSON string or object, handling nested arrays and objects, and returns the parsed result.
Readme
@unmilley/deep-parse-json
Recursively parses a JSON string or object, handling nested arrays and objects, and returns the parsed result.
Usage
Install the package:
# pnpm
pnpm add @unmilley/deep-parse-json
# yarn
yarn add @unmilley/deep-parse-json
# npm
npm install @unmilley/deep-parse-jsonImport:
import { deepParseJson } from "@unmilley/deep-parse-json";
const data: SomeType = {
/*...*/
};
const deepParsed = deepParseJson<SomeType>(JSON.stringify(data));Development
- Clone this repository
- Install latest LTS version of Node.js
- Enable Corepack using
corepack enable - Install dependencies using
pnpm install - Run interactive tests using
pnpm dev
License
MIT. Made with 💛
