
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
multi-random-access
Advanced tools
An abstract-random-access compliant instance that combines multiple other abstract-random-access instances into a single one.
An abstract-random-access compliant instance (API similar to random-access-file) that combines multiple other abstract-random-access instances into a single one.
npm install multi-random-access
In the below example we'll create a multi-random-access instance that writes to different instances of random-access-memory, each containing 10 bytes of data.
var multi = require('multi-random-access')
var ram = require('random-access-memory')
var storage = multi(function (offset, cb) {
var index = Math.floor(offset / 10)
console.log('Creating new underlying storage')
cb(null, {
start: index * 10,
end: index * 10 + 10,
storage: ram()
})
})
storage.write(0, Buffer('hello world'), function (err) {
if (err) throw err
storage.read(0, 11, function (err, buf) {
if (err) throw err
console.log(buf.toString())
})
})
var storage = multi([options], open)Create a new instance. open is a function that is called when a new storage instance is needed. A new instance is needed when a read or write happens in a byte range that has not been opened yet.
The signature for open is (offset, cb). You should call the callback with an object containing the following properties:
function open (offset, cb) {
cb(null, {
start: startByteOffset,
end: endByteOffset,
storage: abstractRandomAccessInstance
})
}
Options include:
{
limit: 16 // start closes old stores after this many was opened
}
MIT
FAQs
An abstract-random-access compliant instance that combines multiple other abstract-random-access instances into a single one.
The npm package multi-random-access receives a total of 117 weekly downloads. As such, multi-random-access popularity was classified as not popular.
We found that multi-random-access 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.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.