
Security News
OpenGrep Restores Fingerprinting in JSON and SARIF Outputs
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
bkv is browser persistent key/value storage with simple interface. It supports actual IndexedDB / localStorage. With silent fallback to memory store for error-less work (optional).
Install
npm install bkv --save
const bkv = new window.BKV()
await bkv.set('dolorem', { lorem: 'ipsum' })
const data = await bkv.get('dolorem')
console.log(`Loaded: ${data}`)
await bkv.remove('dolorem'));
Note, all methods with optional callbacks will return promises if callback is not set.
Options:
prefix
- Data namespace. Default - bkv
. Used to separate data for
multiple instances, if required.stores
- Array of storage names to use, ordered by preference.
Default ['indexeddb', 'localstorage', 'zero']
. Set to ['indexeddb', 'localstorage']
if no fallback to memory required.* zero
is simple memory store for silent fallback when no persistent storages available.
Load data by key
name. If not exists - returns default
(if passed) or undefined
.
Load all data from storage as [ { key, value }, { key, value }, ... ]
.
Put data into storage under key
name.
key
- String to address data.data
- serializable JS object to store.ttl
- Expiration time in seconds. Default = 0 (don't expire).Remove key
data from store. If Array
passed - remove all listed keys.
Clear all storage data (in your namespace), or just expired objects when called
with true
param.
Auto-executed on first call of any method. Usually not needed. But may be used, if you need exact info about availability of persistent storage, prior to start.
Alias of new BKV(options)
Similar to .create()
but returns the same (cached) instance for the same
options. Useful if you need BKV in multiple modules, and don't wish to
initialize it every time.
FAQs
Browser key/value storage with simple interface
The npm package bkv receives a total of 23 weekly downloads. As such, bkv popularity was classified as not popular.
We found that bkv 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
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.