0.0.1 • Published 3 years ago
mdast-util-hast v0.0.1
mdast-util-hast
Utilities to work with hast attributes in mdast.
Content
What is this?
This package provides a few helper functions to add hast properties to your mdast. With the following functions you can control the generated HTML:
getHProperties: get the hProperties and set any property on the generated HTML elementaddHClasses: sets the hPropertyclassand makes sure not to introduce duplicatessetHName: set the tag name of the HTML element
When should I use this?
If you want to add hast attributes to your mdast in order to control the generated HTML.
Install
This package is ESM only.
In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm:
npm install mdast-util-hastUse
This is still in very early alpha, hence, I can only provide very little documentation.
Use at your own risk.
0.0.1
3 years ago