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.
@brainfish-ai/remove-markdown
Advanced tools
remove-markdown is a node.js module that will remove (strip) Markdown formatting from text. Markdown formatting means pretty much anything that doesn’t look like regular text, like square brackets, asterisks etc.
The typical use case is to display an excerpt from some Markdown text, without any of the actual Markdown syntax - for example in a list of posts.
npm install @brainfish-ai/remove-markdown
const removeMd = require('remove-markdown');
const markdown = '# This is a heading\n\nThis is a paragraph with [a link](http://www.disney.com/) in it.';
const plainText = removeMd(markdown); // plainText is now 'This is a heading\n\nThis is a paragraph with a link in it.'
You can also supply an options object to the function. Currently, the following options are supported:
const plainText = removeMd(markdown, {
stripListLeaders: true , // strip list leaders (default: true)
listUnicodeChar: '', // char to insert instead of stripped list leaders (default: '')
gfm: true // support GitHub-Flavored Markdown (default: true)
useImgAltText: true // replace images with alt-text, if present (default: true)
});
Setting stripListLeaders
to false will retain any list characters (*, -, +, (digit).
).
FAQs
Remove Markdown formatting from text
The npm package @brainfish-ai/remove-markdown receives a total of 43 weekly downloads. As such, @brainfish-ai/remove-markdown popularity was classified as not popular.
We found that @brainfish-ai/remove-markdown demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
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.