Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
rehype-partials
Advanced tools
Partials support for rehype.
With the following html,
<div class='container'>
<!-- href='include/hello.html' -->
</div>
<div class='hello'>
<!-- href='world.html' -->
</div>
<div class='world'>
<p>world</p>
</div>
and the following js,
var reporter = require('vfile-reporter')
var format = require('rehype-format')
var vfile = require('to-vfile')
var rehype = require('rehype')
var partials = require('rehype-partials')
rehype()
.use(partials)
.use(format)
.process(toVfile.readSync('./index.html'), function (err, file) {
console.error(reporter(err || file))
console.log(String(file))
})
will output:
./index.html: no issues found
<html>
<head></head>
<body>
<div class="container">
<div class="hello">
<div class="world">
<p>world</p>
</div>
</div>
</div>
</body>
</html>
options.handle
Type: function
Default: fs.readFile
Function used to get a partial. example
options.cwd
Type: String
Default: ''
Set the current working directory to resolve a partial's path.
options.noresolve
Type: Boolean
Default: false
Whether or not to use path.resolve
when looking for a partial.
options.messages
Type: Boolean
Default: true
Whether to include messages generated when parsing a partial.
MIT © Paul Zimmer
FAQs
Partials support for rehype
The npm package rehype-partials receives a total of 12 weekly downloads. As such, rehype-partials popularity was classified as not popular.
We found that rehype-partials 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.