Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
buffer-split-transform
Advanced tools
creates a transform stream that splits chunks without intermediate string conversion
Creates a transform stream that splits chunks without intermediate string conversion.
import split from 'buffer-split-transform'
// source is a readable stream which emits:
// <Buffer 74 68 69 73 20 69 73 0a 69 74>
const sink = source.pipe(split())
sink.on(`data`, console.log)
// <Buffer 74 68 69 73 20 69 73>
// <Buffer 69 74>
split([delimiter], [options])
delimiter
if set overrides the default delimiter of Buffer.from('\n')
.
options
defualts to:
{ flushRemainingChunk: true }
If flushRemainingChunk
is set to false
, the remainder of a split chunk will be omitted when the source stream ends. This can be useful if you are only interested in data before the specified delimiter.
In cases where extra verbosity is desired, split can be called like so:
split({
delimiter: Buffer.from(`\n\n`),
flushRemainingChunk: false
})
FAQs
creates a transform stream that splits chunks without intermediate string conversion
The npm package buffer-split-transform receives a total of 3 weekly downloads. As such, buffer-split-transform popularity was classified as not popular.
We found that buffer-split-transform 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.