mdast-util-is-type

v0.1.0
Simple helpers to resolve MDAST types. Includes typescript types.

mdast-util-is-type

Simple helpers to resolve MDAST types. Includes typescript types.

These functions are incredibly simple, for example:

export const isHeading = (node: any): node is Heading => {
  return node.type === 'heading';
};

They can be used as type predicates. They're all single exports and so should play nicely with tree shaking tools.

npm i mdast-util-is-type

Metadata

  • MIT
  • >=10
  • Callum Macdonald
  • released 6/12/2020

Downloads

Maintainers