Skip to content
FyresitePublic

About

A simple JSONL class that handles parsing and stringifying

Resources

Stars

0 stars

Watchers

4 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

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);

About

A simple JSONL class that handles parsing and stringifying

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages