
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
mdast-util-inject
Advanced tools
Inject some markdown into some other markdown, keeping heading structure intact.
An mdast utility to inject some markdown into some other markdown, keeping heading structure intact.
npm install mdast-util-inject
Inject some markdown into some other markdown at a desired heading. Heading levels in the source markdown are adjusted to match the target document based on the target heading's level. targetAst is modified in place
Parameters
targetHeadingText
string The heading to look for in the target asttargetAst
object The target markdown document, as an mdasttoInjectAst
object The source markdown to be injected into the target, also as an mdast.Examples
var mdast = require('mdast')
var inject = require('mdast-util-inject')
var target = mdast.parse('# A document\n## Section1\nBlah\n## Section2\nBlargh')
var newStuff = mdast.parse('# Some other document\nwith some content')
inject('Section1', target, newStuff)
console.log(mdast.stringify(target))
// outputs:
// # A document
//
// ## Section1
//
// ### Some other document
//
// with some content
//
// ## Section2
//
// Blargh
Returns boolean whether the specified section was found and content inserted
FAQs
Inject some markdown into some other markdown, keeping heading structure intact.
The npm package mdast-util-inject receives a total of 92,257 weekly downloads. As such, mdast-util-inject popularity was classified as popular.
We found that mdast-util-inject 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.