lnjson
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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
}

Readme

Keywords

none

Package Sidebar

Install

npm i lnjson

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

4.39 kB

Total Files

4

Last publish

Collaborators

  • cursorspkg