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

mdast-util-to-hast

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-to-hast - npm Package Compare versions

Comparing version 11.0.0 to 11.1.0

6

index.d.ts

@@ -0,1 +1,7 @@

export {all} from './lib/all.js'
export {one} from './lib/one.js'
export {toHast} from './lib/index.js'
export type Options = import('./lib/index.js').Options
export type Handler = import('./lib/index.js').Handler
export type Handlers = import('./lib/index.js').Handlers
export type H = import('./lib/index.js').H

@@ -0,1 +1,10 @@

/**
* @typedef {import('./lib/index.js').Options} Options
* @typedef {import('./lib/index.js').Handler} Handler
* @typedef {import('./lib/index.js').Handlers} Handlers
* @typedef {import('./lib/index.js').H} H
*/
export {all} from './lib/all.js'
export {one} from './lib/one.js'
export {toHast} from './lib/index.js'

3

lib/index.d.ts

@@ -20,3 +20,4 @@ /**

export type PositionLike = import('unist-util-position').PositionLike
export type FootnoteDefinitionVisitor = import('unist-util-visit').Visitor<FootnoteDefinition>
export type FootnoteDefinitionVisitor =
import('unist-util-visit').Visitor<FootnoteDefinition>
export type Content = Element | Text | Comment

@@ -23,0 +24,0 @@ export type EmbeddedHastFields = {

{
"name": "mdast-util-to-hast",
"version": "11.0.0",
"version": "11.1.0",
"description": "mdast utility to transform to hast",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -57,3 +57,3 @@ # mdast-util-to-hast

This package exports the following identifiers: `toHast`.
This package exports the following identifiers: `toHast`, `all`, `one`
There is no default export.

@@ -221,2 +221,14 @@

### `all(h, parent)`
Helper function for writing custom handlers passed to `options.handlers`.
Pass it `h` and a parent node (mdast) and it will turn the node’s children into
an array of transformed nodes (hast).
### `one(h, node, parent)`
Helper function for writing custom handlers passed to `options.handlers`.
Pass it `h`, a `node`, and its `parent` (mdast) and it will turn `node` into
hast content.
## Security

@@ -223,0 +235,0 @@

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