
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
In-memory persistence for streams. Enables you to replay streams, even if they're not finished yet.
Need real persistence? Check out level-store for a fast and flexible streaming storage engine based on LevelDB.
var enstore = require('enstore');
// create a new store
var store = enstore();
// store a someStream in it
someStream.pipe(store.createWriteStream());
// pipe everything someStream emitted to someWhereElse
// doesn't matter if someStream already finished
store.createReadStream().pipe(someWhereElse);
This basically can be done for any streaming resource, like fs.createReadStream()
or request()
, that you
want to cache in memory.
var http = require('http');
var browserify = require('browserify');
var enstore = require('enstore');
// fill the cache
var cache = enstore();
browserify('app.js').bundle().pipe(cache.createWriteStream());
http.createServer(function (req, res) {
if (req.url == '/bundle.js') {
// stream the bundle to the client
res.writeHead(200, { 'Content-Type' : 'application/javascript' });
store.createReadStream().pipe(res);
}
});
To recreate / flush the cache just overwrite the cache
variable with a new enstore
instance.
Returns a new store.
Writable stream that stores written data in the internal store. opts
will be passed to the Writable()
constructor.
Readable stream that emits both what is already stored and what comes in over
createWriteStream()
until end
is emitted. opts
will be passed to the Readable()
constructor.
With npm do
$ npm install enstore
For the client, bundle with browserify.
(MIT)
FAQs
In-memory persistence for streams
The npm package enstore receives a total of 5,390 weekly downloads. As such, enstore popularity was classified as popular.
We found that enstore 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
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.