
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
random-access-database
Advanced tools
Store fixed size values in an abstract-random-access compatible storage provider
Store fixed size values in an abstract-random-access compatible storage provider
npm install random-access-database
var rad = require('random-access-database')
var raf = require('random-access-file')
var db = rad(raf('db'), {valueLength: 5})
db.put(0, 'hello', function (err) {
if (err) throw err
db.get(0, function (err, val) {
if (err) throw err
console.log('stored at 0:', val)
})
})
var db = rad(storage, options)Create a new databae. storage should be an abstract-random-access compatible storage provider. Options include
{
valueEncoding: encodeValuesUsingThisEncoding,
valueLength: lengthOfAllValues,
offset: functionThatReturnsValueOffset
}
You must either set the valueLength of offset option. The offset option is called with the numeric index of a value and should return the byte offset of this value.
db.put(index, value, [callback])Insert a value in the database.
db.get(index, callback)Retrieve a value from the database. Callback is called with (err, value).
db.del(index, [callback])Delete a value from the database. Will blank it out in the underlying storage.
MIT
FAQs
Store fixed size values in an abstract-random-access compatible storage provider
The npm package random-access-database receives a total of 2 weekly downloads. As such, random-access-database popularity was classified as not popular.
We found that random-access-database 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
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.