Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

micromark-extension-mdxjs-esm

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-extension-mdxjs-esm

micromark extension to support MDX JS import/exports

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6M
decreased by-11.9%
Maintainers
1
Weekly downloads
 
Created

What is micromark-extension-mdxjs-esm?

The micromark-extension-mdxjs-esm package is an extension for the micromark Markdown parser that adds support for parsing MDX.js (Markdown for the component era). It allows users to use JSX within their Markdown documents, enabling the embedding of React components and other JSX elements.

What are micromark-extension-mdxjs-esm's main functionalities?

Parsing MDX syntax

This feature allows the parsing of MDX syntax within Markdown content. The code sample demonstrates how to use the micromark parser with the mdxjs extension to parse a string containing an MDX component.

import {micromark} from 'micromark';
import {mdxjs} from 'micromark-extension-mdxjs-esm';

const output = micromark('<MyComponent />', {
extensions: [mdxjs()]
});

Support for JSX

This feature enables the use of JSX within Markdown documents. The code sample shows how to parse a Markdown string that includes a JSX component with a prop.

import {micromark} from 'micromark';
import {mdxjs} from 'micromark-extension-mdxjs-esm';

const output = micromark('# Hello, world!\n\n<MyComponent prop1={value} />', {
extensions: [mdxjs()]
});

Other packages similar to micromark-extension-mdxjs-esm

Keywords

FAQs

Package last updated on 19 Oct 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc