@heisenware/storage
v0.2.0
Published
Efficient and robust JSON file storage
Downloads
21
Readme
JSON File Storage
Asynchronous persistent data structures in Node.js, modeled after HTML5 localStorage
@heisenware/storage doesn't use a database. Instead, JSON documents are stored in the file system for persistence. Because there is no network and relational query overhead, @heisenware/storage is just about as fast as a database can get.
Install
npm install @heisenware/storage
Example
const Storage = require('@heisenware/storage')
const path = require('path')
const storage = new Storage({ dir: path.join(__dirname, 'my-storage') })
await storage.setItem('item1', 'value1')
const item1 = await storage.getItem('item1')
console.log('item1:', item1)
await storage.removeItem('item1')