
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
consume-until
Advanced tools
Consume a stream until a given pattern is found.
var net = require('net')
var consumeUntil = require('consume-until')
var socket = net.connect({ host: 'example.com', port: 80 })
socket.write('GET / HTTP/1.1\r\n')
socket.write('Host: example.com\r\n')
socket.write('\r\n')
consumeUntil(socket, '\r\n\r\n', function (err, headers) {
if (err) throw err
console.log('HTTP response headers:')
console.log(headers)
console.log('HTTP response body:')
socket.pipe(process.stdout)
})
consumeUntil(stream, pattern, callback)The module exposes a single function which takes 3 arguments:
stream - The stream to consumepattern - Either a string or a buffer containing the pattern to look
for in the streamcallback - The callback will be called when the pattern is
detected. The data consumed up until the pattern will be given as the
second argument. An error is given as the first argument if the
stream either ends before the pattern is found or emits an errorMIT
FAQs
Consume a stream until a given pattern is found
The npm package consume-until receives a total of 60 weekly downloads. As such, consume-until popularity was classified as not popular.
We found that consume-until 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.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.