1.0.1 • Published 2 years ago

@fyresite/jsonl v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

jsonl

A simple JSONL class that handles parsing and stringifying

Installation

npm install @fyresite/jsonl

or

yarn add @fyresite/jsonl

Usage

const { readFile, writeFile } = require("fs/promises");
const JSONL = require("@fyresite/jsonl");

const jsonlFile = await readFile("example.jsonl");

const jsonl = JSONL.parse(jsonlFile);
jsonl.push({ foo: "bar" });

const jsonlString = JSONL.stringify(jsonl);

await writeFile("updated-example.jsonl", jsonlString);
1.0.1

2 years ago

1.0.0

2 years ago