disk-storage is a Node.js library for storing large amounts of data efficiently on disk. It provides buffer-based reading with cursor support and parallelism, as well as line and batch line reading. Writing is done via append operations. It is designed for high performance and works on Node.js versions 8 and above. The library is stable at version 1.3.2 and is actively maintained on GitHub. It is a lightweight alternative to more complex storage solutions like LevelDB or RocksDB, focusing on simplicity and efficiency for log-like data.
npm install disk-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This example shows how to create a DiskStorage instance, append data, and read lines using an async iterator.
Check permissions of the parent directory before creating the storage.
Use the current option but monitor releases for changes.
Keep track of the cursor externally if you need to restart reading.
Upgrade to Node.js 8 or later.
Ensure you have the latest version installed: npm install disk-storage@latest and use correct import.
Run the process with appropriate permissions or change the directory to a writable location.
Use CommonJS require: const { DiskStorage } = require('disk-storage'); or set up a transpiler.No dependency data recorded yet.