xr-easy-json

1.0.3 • Public • Published

xr-easy-json

Example

const Data = require('xr-easy-json')
const db = new Data("./db.xr")

// Set data
db.set("hello.man", "Hello") // Hello

// Get data
db.get("hello.man") // Hello

// Fetch data
db.fetch("hello.man") // Hello

// Has data
db.has("hello.man") // true

// Delete data
db.delete("hello.man")

db.get("hello.man") // undefined
db.has("hello.man") // false

// Array data
db.set("list", [ "apple", "milk" ])
db.push("list", "bread") // ["apple", "milk", "bread"]

// Fetch all datas
db.all()

// Clear data
db.clear()

Package Sidebar

Install

npm i xr-easy-json

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

2.89 kB

Total Files

4

Last publish

Collaborators

  • xariona