Skip to content
/ lnjson Public

Link a plain old JavaScript object with a JSON file.

Notifications You must be signed in to change notification settings

mchccn/lnjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lnjson

Link a plain old JavaScript object with a JSON file.

Why

Because I'm tired of seeing and hearing this:

const json = require("./file.json");

json.property = 42;

"Why doesn't the JSON file get updated?"

Installation and usage

$ npm install lnjson --save
$ yarn add lnjson
$ git clone https://github.com/cursorsdottsx/lnjson.git node_modules/lnjson

Code:

import lnjson from "lnjson";

const linked = lnjson("linked.json");

linked.property = 42;

Output:

linked.json:

{
    "property": 42
}

About

Link a plain old JavaScript object with a JSON file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published