https://github.com/chmac/mdast-util-is-type
Simple isHeading(), isXXXX() helpers with typescript types for mdast
https://github.com/chmac/mdast-util-is-type
mdast mdast-util unifiedjs
Last synced: 5 months ago
JSON representation
Simple isHeading(), isXXXX() helpers with typescript types for mdast
- Host: GitHub
- URL: https://github.com/chmac/mdast-util-is-type
- Owner: chmac
- License: mit
- Created: 2020-06-12T15:14:10.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-13T14:33:27.000Z (over 4 years ago)
- Last Synced: 2025-02-08T03:47:06.645Z (over 1 year ago)
- Topics: mdast, mdast-util, unifiedjs
- Language: TypeScript
- Homepage:
- Size: 1.03 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mdast-util-is-type
Simple helpers to resolve MDAST types. Includes typescript types.
These functions are incredibly simple, for example:
```typescript
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.