Skip to content
/ jsonl Public

A simple JSONL class that handles parsing and stringifying

License

Notifications You must be signed in to change notification settings

Fyresite/jsonl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published