Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
minify-stream
Advanced tools
minify javascript in a stream using uglify-js
npm install minify-stream
var minifyStream = require('minify-stream')
fs.createReadStream('app.js')
.pipe(minifyStream())
.pipe(fs.createWriteStream('app.min.js'))
minifyStream(?options)
Create a new minify stream. Write a Javascript file or bundle to it.
Possible options
are:
uglify
- An uglify module to use, defaults to terser
.
It must have an uglify-compatible minify()
function.minify()
function as the second parameter.
See the terser docs for available options.minify-stream
adds inline source maps by default. Use exorcist
to extract source maps from the output stream into a separate file. If you don't need source maps, pass
the sourceMap: false
option to disable them.
minifyStream({ sourceMap: false })
FAQs
minify javascript in a stream using uglify-js
We found that minify-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.