88[ ![ Backers] [ backers-badge ]] [ collective ]
99[ ![ Chat] [ chat-badge ]] [ chat ]
1010
11- Assert [ mdast] [ ] nodes .
11+ [ ** mdast** ] [ mdast ] utility to assert trees .
1212
13- ## Installation
13+ ## Install
1414
1515[ npm] [ ] :
1616
17- ``` bash
17+ ``` sh
1818npm install mdast-util-assert
1919```
2020
2121## Usage
2222
23- ``` javascript
23+ ``` js
2424var assert = require (' mdast-util-assert' )
2525
2626assert ({type: ' root' , children: []})
@@ -39,19 +39,21 @@ assert({type: 'paragraph', value: 'foo'})
3939
4040### ` assert(node) `
4141
42- Assert that ` node ` is a valid [ mdast] [ ] node. If ` node ` has ` children ` ,
43- all children will be asserted as well.
42+ Assert that [ ` tree ` ] [ tree ] is a valid [ mdast] [ ] [ node] [ ] .
43+ If ` tree ` is a [ parent ] [ ] , all [ child ] [ ] ren will be asserted as well.
4444
4545The ` assert.parent ` , ` assert.text ` , ` assert.void ` , and ` assert.wrap `
4646methods from [ ` unist-util-assert ` ] [ unist-util-assert ] are also included.
4747
4848## Contribute
4949
50- See [ ` contributing.md ` in ` syntax-tree/mdast ` ] [ contributing ] for ways to get
50+ See [ ` contributing.md ` in ` syntax-tree/.github ` ] [ contributing ] for ways to get
5151started.
52+ See [ ` support.md ` ] [ support ] for ways to get help.
5253
53- This organisation has a [ Code of Conduct] [ coc ] . By interacting with this
54- repository, organisation, or community you agree to abide by its terms.
54+ This project has a [ Code of Conduct] [ coc ] .
55+ By interacting with this repository, organisation, or community you agree to
56+ abide by its terms.
5557
5658## License
5759
@@ -91,10 +93,20 @@ repository, organisation, or community you agree to abide by its terms.
9193
9294[ author ] : https://wooorm.com
9395
96+ [ contributing ] : https://github.com/syntax-tree/.github/blob/master/contributing.md
97+
98+ [ support ] : https://github.com/syntax-tree/.github/blob/master/support.md
99+
100+ [ coc ] : https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
101+
94102[ mdast ] : https://github.com/syntax-tree/mdast
95103
96104[ unist-util-assert ] : https://github.com/syntax-tree/unist-util-assert
97105
98- [ contributing ] : https://github.com/syntax-tree/mdast/blob/master/contributing.md
106+ [ tree ] : https://github.com/syntax-tree/unist#tree
107+
108+ [ child ] : https://github.com/syntax-tree/unist#child
109+
110+ [ node ] : https://github.com/syntax-tree/mdast#nodes
99111
100- [ coc ] : https://github.com/syntax-tree/mdast/blob/master/code-of-conduct.md
112+ [ parent ] : https://github.com/syntax-tree/mdast#parent
0 commit comments