Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
remark-remove-comments
Advanced tools
Remark plugin to remove HTML comments from the processed output.
npm:
npm install remark-remove-comments
Say we have the following file, example.md
:
# Hello World
This is a markdown file, with text in it.
<!-- But in this file there's a comment, like "TODO: fix 😅",
I don't want this to appear in the HTML output, it's just for me -->
And our script, example.js
, looks as follows:
const fs = require('fs');
const remark = require('remark');
const removeComments = require('remark-remove-comments');
remark()
.use(removeComments)
.process(fs.readFileSync('example.md', 'utf-8'), function (err, file) {
if (err) throw err;
console.log(String(file));
});
Now, running node example
yields:
# Hello World
This is a markdown file, with text in it.
remark().use(removeComments)
Removes comments.
FAQs
Remark plugin to remove HTML comments from the processed output
The npm package remark-remove-comments receives a total of 5,557 weekly downloads. As such, remark-remove-comments popularity was classified as popular.
We found that remark-remove-comments demonstrated a healthy version release cadence and project activity because the last version was released less than 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 researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.