1.0.1 • Published 2 years ago

bitejs v1.0.1

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

BiteJS

Javascript JSON parser

Download

yarn add bitejs
# or
npm install bitejs

Example

// test.json
{
  "name": "AWESOMENAME", //// this is comment!
  "age": 30, // ...
  "woman": false,
  "hobby": ["⚽ soccer", "🎨 draw"]
  /*
  lol!
  */
}
const fs = require("fs");
const { Bite } = require("bitejs");

const bite = new Bite(fs.readFileSync("./test.json").toString());

bite.set("name", "COOLNAME");
bite.remove("age");
bite.set("about", "Hello, World!");

console.log(bite.get());

/*
output : 
{
  name: 'COOLNAME',
  age: null,
  woman: false,
  hobby: [ '⚽ soccer', '🎨 draw' ],
  about: 50
}
*/
1.0.1

2 years ago

1.0.0

2 years ago