
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
remark-mdx-remove-imports
Advanced tools
Remove import nodes from the MDXAST. This is useful for scenarios where the imports aren’t needed, like an MDX playground.
npm:
npm install --save remark-mdx-remove-imports
Say we have the following MDX file, example.mdx
:
import { Donut } from 'rebass'
import OtherThing from 'other-place'
export default props => <div {...props} />
# Hello, world!
This is a paragraph
And our script, example.js
, looks as follows:
const vfile = require('to-vfile')
const remark = require('remark')
const mdx = require('remark-mdx')
const mdxjs = require('remark-mdxjs')
const removeImports = require('remark-mdx-remove-imports')
remark()
.use(mdx)
.use(mdxjs)
.use(removeImports)
.process(vfile.readSync('example.md'), function (err, file) {
if (err) throw err
console.log(String(file))
})
Now, running node example
yields:
export default props => <div {...props} />
# Hello, world!
This is a paragraph
See the Support and Contributing guidelines on the MDX website for ways to (get) help.
This project has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
FAQs
Deprecated: this package is no longer maintained.
We found that remark-mdx-remove-imports demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.