
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
streamsummary-stream
Advanced tools
Stream-based implementation of the StreamSummary data structure described in this paper.
Pipe in your buffers/strings to get approximate top-K most frequent elements.
var StreamSummary = require('streamsummary-stream');
var ss = new StreamSummary(50);
//...
myDataSource.pipe(ss);
ss.on('finish', function() {
console.log(ss.frequency('42'));
console.log(ss.top());
});
MapThis module uses es6 Maps, so you probably need node.js >= 0.12 or io.js.
Construct a new writable StreamSummary to track the size most frequent elements (extends Stream.Writable).
size - the number of elements to trackstreamOpts - the options to pass to the Stream constructorGet the approximate frequency of element. Returns null if the element isn't in the top size elements.
element - the value in questionGet the top size most frequent elements in ascending order of frequency.
Export the StreamSummary data as an object. Exported object will look like:
{
size: 42,
numUsedBuckets: 40,
trackedElements: {...},
registers: [...]
}
Import a StreamSummary data object (expects same format as export() returns).
data - object containing StreamSummary dataMerge another StreamSummary with this one. Returns a new StreamSummary of size equal to the combined sizes of the two.
ss - another StreamSummary instanceFAQs
Stream-based stream summary implementation
We found that streamsummary-stream 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.