
Security News
Socket Security Analysis Is Now One Click Away on npm
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.
fixed-entry-db
Advanced tools
A flat file append-only database that uses fixed size entries
npm install fixed-entry-db
var fixeddb = require('fixed-entry-db')
var db = fixeddb('./database.db', 5) // entries are 5 bytes
db.append(new Buffer('hello'))
db.append(new Buffer('world'), function () {
db.get(0, console.log) // prints hello
db.get(1, console.log) // prints world
})
db = fixeddb(filename, entrySize)Instantiate a new database. All entries stored
must be entrySize large.
db.append(buf, [cb])Append a new entry.
db.get(index, cb)Get a entry at a specific index.
db.put(index, buf, [cb])Override an old entry.
stream = db.createWriteStream()Create a write stream that appends all entries written to the stream to the database.
stream = db.createReadStream([opts])Create a read stream of all entries in the database.
Optionally you can pass gt: index or gte: index to the options
map to only read entries after a specific index.
db.close([cb])Close the database.
db.flush([cb])Flush the database. Performs a fsync on the file to make sure all changes are flushed to disk.
db.open([cb])Force open the database. The database is opened lazily when
you perform an operation. After the database has been opened
db.entries should be set to the number of entries in the database
and db.size should be set to the total ondisk size of the database
MIT
FAQs
A flat file append-only database that uses fixed size entries
The npm package fixed-entry-db receives a total of 3 weekly downloads. As such, fixed-entry-db popularity was classified as not popular.
We found that fixed-entry-db 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
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.