@heliactyl/vault
v1.0.0
Published
Vault is a lightweight wrapper around SQLite that provides a simple key-value store. Vault has `get`, `set`, `delete`, and `all` for interacting with the SQLite database. This module can be used as a drop-in replacement for Keyv, even on older versions of
Downloads
11
Readme
Heliactyl Vault
Vault is a lightweight wrapper around SQLite that provides a simple key-value store. Vault has get
, set
, delete
, and all
for interacting with the SQLite database. This module can be used as a drop-in replacement for Keyv, even on older versions of Heliactyl.
Example usage
const Vault = require('@heliactyl/vault');
const db = new Vault('./database.sqlite');
// Example usage:
db.set('foo', { bar: 'baz' })
.then(() => db.get('foo'))
.then(value => console.log('Value:', value)) // Value: { bar: 'baz' }
.catch(err => console.error('Error:', err));```