
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@haxtra/kvstore-sqlite
Advanced tools
Basic key-value store for SQLite databases.
npm install @haxtra/kvstore-sqlite
super-sqlite3
or better-sqlite3
instance as the database driverCreate instance
const KVStore = require('@haxtra/kvstore-sqlite')
const kv = new KVStore(superSqlite3Instance, {
table: 'kvstore' // table to use for the store, default "kvstore"
})
// when running for the first time, create the table
kv.createTable()
Note: All methods are synchronous.
Set/update value
kv.set(keyName, jsonableData)
Retrieve value from the store, falling back to optional default
kv.get(keyName, defaultValue?)
Remove key from the store
kv.delete(keyName)
Check if key exists, returns timestamp of the last update, or false if key is not set
kv.has(keyName)
Get count of stored keys
kv.count()
Get array of stored keys
kv.keys(page?, perPage?)
Get full store data, as an array of objects
kv.data(page?, perPage?)
Remove all data from the store
kv.purge()
Create store table with preconfigured name, defaults to kvstore
. Returns true
on success, false
if table exists, throws on invalid table name.
kv.createTable()
Get schema definition as a SQL string, with respect to current config.
kv.getSchema()
Get absolute path to schema.sql
file:
require.resolve('@haxtra/kvstore-sqlite/schema.sql')
MIT
FAQs
Basic key-value store for SQLite databases
We found that @haxtra/kvstore-sqlite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.