Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
stream-storage
Advanced tools
Simple duplex streams for cache large data in memory and files.
npm install stream-storage
import { StreamStorage } from 'stream-storage';
const streamStorage = new StreamStorage();
// using ...
streamStorage.clear();
StreamStorage extends the standard stream.Duplex interface. All writes data to this stream will accumulate in internal Buffers. Data exceeding the maxMemorySize of the size will be saved to a file.
You can change default options:
const streamStorage = new StreamStorage({
maxMemorySize: (32 * 1024), // max memory size, bytes
tmpDir: '.', // temp dir for a file
pushMsec: 1, // pushed data interval, msec
chunkSize: (8 * 1024), // pushed data chunk size, bytes
});
For rereading data you can move current stream to new by StreamStorage.move()
.
More using cases and examples you can see in test.
Thanks to the node-stream-buffer for inspiration!
For run test:
npm run test
FAQs
Node duplex buffer stream for caching data.
We found that stream-storage 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.