1- # hast-util-to-dom [ ![ Build Status ] [ travis-badge ]] [ travis ]
1+ # hast-util-to-dom
22
3- Transform [ HAST] [ ] to a DOM tree
3+ [ ![ Build] [ build-badge ]] [ build ]
4+ [ ![ Coverage] [ coverage-badge ]] [ coverage ]
5+ [ ![ Downloads] [ downloads-badge ]] [ downloads ]
6+ [ ![ Size] [ size-badge ]] [ size ]
7+ [ ![ Sponsors] [ sponsors-badge ]] [ collective ]
8+ [ ![ Backers] [ backers-badge ]] [ collective ]
9+ [ ![ Chat] [ chat-badge ]] [ chat ]
410
5- ## Installation
11+ [ ** hast** ] [ hast ] utility to transform to a DOM tree.
12+
13+ ## Install
614
715[ yarn] [ ] :
816
9- ``` bash
17+ ``` sh
1018yarn add hast-util-to-dom
1119```
1220
1321[ npm] [ ] :
1422
15- ``` bash
23+ ``` sh
1624npm install hast-util-to-dom
1725```
1826
@@ -62,19 +70,70 @@ Buddy, that’s the web!
6270
6371## API
6472
65- ### ` toDOM(node) `
73+ ### ` toDOM(node[, options]) `
74+
75+ Transform a [ ** hast** ] [ hast ] [ * tree* ] [ tree ] to a DOM tree.
76+
77+ ##### ` options `
78+
79+ ###### ` options.fragment `
80+
81+ Whether a DOM fragment should be returned (default: ` false ` ).
82+
83+ ###### ` options.namespace `
84+
85+ ` namespace ` to use to create [ * elements* ] [ element ] .
6686
67- Transform a [ HAST Node] [ node ] to DOM ` Node ` .
87+ ## Related
88+
89+ * [ ` hast-util-sanitize ` ] ( https://github.com/syntax-tree/hast-util-sanitize )
90+ — Sanitize hast nodes
91+ * [ ` hast-util-to-html ` ] ( https://github.com/syntax-tree/hast-util-to-html )
92+ — Create an HTML string
93+ * [ ` hast-util-from-dom ` ] ( https://github.com/syntax-tree/hast-util-from-dom )
94+ — Create a hast tree from a DOM tree
95+
96+ ## Contribute
97+
98+ See [ ` contributing.md ` in ` syntax-tree/.github ` ] [ contributing ] for ways to get
99+ started.
100+ See [ ` support.md ` ] [ support ] for ways to get help.
101+
102+ This project has a [ Code of Conduct] [ coc ] .
103+ By interacting with this repository, organisation, or community you agree to
104+ abide by its terms.
68105
69106## License
70107
71108[ ISC] [ license ] © [ Keith McKnight] [ author ]
72109
73110<!-- Definitions -->
74111
75- [ travis-badge ] : https://img.shields.io/travis/syntax-tree/hast-util-to-dom.svg
112+ [ build-badge ] : https://img.shields.io/travis/syntax-tree/hast-util-to-dom.svg
113+
114+ [ build ] : https://travis-ci.org/syntax-tree/hast-util-to-dom
115+
116+ [ coverage-badge ] : https://img.shields.io/codecov/c/github/syntax-tree/hast-util-to-dom.svg
76117
77- [ travis ] : https://travis-ci.org/syntax-tree/hast-util-to-dom
118+ [ coverage ] : https://codecov.io/github/syntax-tree/hast-util-to-dom
119+
120+ [ downloads-badge ] : https://img.shields.io/npm/dm/hast-util-to-dom.svg
121+
122+ [ downloads ] : https://www.npmjs.com/package/hast-util-to-dom
123+
124+ [ size-badge ] : https://img.shields.io/bundlephobia/minzip/hast-util-to-dom.svg
125+
126+ [ size ] : https://bundlephobia.com/result?p=hast-util-to-dom
127+
128+ [ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
129+
130+ [ backers-badge ] : https://opencollective.com/unified/backers/badge.svg
131+
132+ [ collective ] : https://opencollective.com/unified
133+
134+ [ chat-badge ] : https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
135+
136+ [ chat ] : https://spectrum.chat/unified/syntax-tree
78137
79138[ yarn ] : https://yarnpkg.com/lang/en/docs/install
80139
@@ -84,6 +143,14 @@ Transform a [HAST Node][node] to DOM `Node`.
84143
85144[ author ] : https://keith.mcknig.ht
86145
146+ [ contributing ] : https://github.com/syntax-tree/.github/blob/master/contributing.md
147+
148+ [ support ] : https://github.com/syntax-tree/.github/blob/master/support.md
149+
150+ [ coc ] : https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
151+
87152[ hast ] : https://github.com/syntax-tree/hast
88153
89- [ node ] : https://github.com/syntax-tree/hast#ast
154+ [ element ] : https://github.com/syntax-tree/hast#element
155+
156+ [ tree ] : https://github.com/syntax-tree/unist#tree
0 commit comments