
Security News
crates.io Ships Security Tab and Tightens Publishing Controls
crates.io adds a Security tab backed by RustSec advisories and narrows trusted publishing paths to reduce common CI publishing risks.
A simple key/value database with fast rollback support.
npm install rollbackdb
var rollbackdb = require('rollbackdb')
// OBS: currently you have use the latest leveldown (>=1.2.0)
var db = require('levelup')('db', {db: require('leveldown')})
var rdb = rollbackdb(db)
rdb.put('hello', 'world', function () {
var oldChange = rdb.changes
console.log('added hello world at change', rdb.changes)
rdb.put('hello', 'not world', function () {
console.log('added hello not world at change', rdb.changes)
rdb.get('hello', {version: oldChange}, console.log) // prints 'world'
})
})
rdb = rollbackdb(levelup, [options])Create a new rollbackdb instance. You can set version in options
if you want to rollback the database to a previous version
checkoutRdb = rdb.checkout(version)Shorthand for setting the version option in the constructor.
Returns a new instance.
rdb.get(key, [options], cb)Get a key. Set version in the options map to get the key that
was added in a previous version of this database.
rdb.put(key, value, [cb])Insert a key.
rdb.del(key, [cb])Delete a key.
rdb.batch(batch, [cb])Insert and/or deletes a batch of key/values
rdb.batch([{
type: 'put',
key: 'a',
value: 'a'
}, {
type: 'del',
key: 'b',
value: 'b'
}], function (err) {
console.log('batch finished')
})
rdb.changesA property containing the total number of changes/versions added to this database
rs = rdb.createReadStream([options])Create a readable stream of all keys and values in the database. Options include
{
gt: 'keys-must-be-greater-than-me',
gte: 'keys-must-be-greater-or-equal-to-me',
lt: 'keys-must-be-less-than-me',
lte: 'keys-must-be-less-or-equal-to-me',
version: aVersionNumber // read all values in the database at this version
}
ws = rdb.createWriteStream()Returns a writable stream that you can write {type: 'put'|'del', key: key, value: value} pairs to.
All values written will be added to the same version.
MIT
FAQs
A simple key/value database with fast rollback support.
The npm package rollbackdb receives a total of 0 weekly downloads. As such, rollbackdb popularity was classified as not popular.
We found that rollbackdb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
crates.io adds a Security tab backed by RustSec advisories and narrows trusted publishing paths to reduce common CI publishing risks.

Research
/Security News
A Chrome extension claiming to hide Amazon ads was found secretly hijacking affiliate links, replacing creators’ tags with its own without user consent.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.