mdast-util-is-type
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i mdast-util-is-type

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

31.2 kB

Total Files

15

Last publish

Collaborators

  • chmac