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

1.0.1 • Public • Published

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
}
*/

Readme

Keywords

Package Sidebar

Install

npm i bitejs

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

9.13 kB

Total Files

12

Last publish

Collaborators

  • kangdongmandoo