
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
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 3,019 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.