Skip to content

juliangruber/json-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSONStore

Simple json store for node. Saves changes on disk immediately and blocking, so only relevant for cli applications and such.

Usage

import JSONStore from 'json-store'

const db = new JSONStore('./index.json')

db.set('foo', 'bar')
db.get('foo') // bar

db.set('obj', { foo: 'bar' })
db.get('obj').foo // bar