Skip to content

Commit c847a1b

Browse files
committed
Refactor prose
1 parent 9aa4bff commit c847a1b

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

readme.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Modify direct children of a parent.
1818
npm install unist-util-modify-children
1919
```
2020

21-
## Usage
21+
## Use
2222

2323
```js
2424
var u = require('unist-builder')
@@ -50,9 +50,9 @@ Yields:
5050
{
5151
type: 'root',
5252
children: [
53-
{ type: 'leaf', value: '1' },
54-
{ type: 'subtree', children: [ { type: 'leaf', value: '2' } ] },
55-
{ type: 'leaf', value: '3' }
53+
{type: 'leaf', value: '1'},
54+
{type: 'subtree', children: [{type: 'leaf', value: '2'}]},
55+
{type: 'leaf', value: '3'}
5656
]
5757
}
5858
```
@@ -81,16 +81,29 @@ Invoke the bound [`modifier`][modifier] for each child in `parent`
8181
## Related
8282

8383
* [`unist-util-visit`](https://github.com/syntax-tree/unist-util-visit)
84-
Visit nodes
84+
Recursively walk over nodes
8585
* [`unist-util-visit-parents`](https://github.com/syntax-tree/unist-util-visit-parents)
86-
Visit nodes with ancestral information
87-
* [`unist-util-filter`](https://github.com/eush77/unist-util-filter)
86+
Like `visit`, but with a stack of parents
87+
* [`unist-util-filter`](https://github.com/syntax-tree/unist-util-filter)
8888
— Create a new tree with all nodes that pass a test
8989
* [`unist-util-map`](https://github.com/syntax-tree/unist-util-map)
9090
— Create a new tree with all nodes mapped by a given function
91-
* [`unist-util-remove`](https://github.com/eush77/unist-util-remove)
91+
* [`unist-util-flatmap`](https://gitlab.com/staltz/unist-util-flatmap)
92+
— Create a new tree by mapping (to an array) with the provided function and
93+
then flattening
94+
* [`unist-util-find-after`](https://github.com/syntax-tree/unist-util-find-after)
95+
— Find a node after another node
96+
* [`unist-util-find-before`](https://github.com/syntax-tree/unist-util-find-before)
97+
— Find a node before another node
98+
* [`unist-util-find-all-after`](https://github.com/syntax-tree/unist-util-find-all-after)
99+
— Find all nodes after another node
100+
* [`unist-util-find-all-before`](https://github.com/syntax-tree/unist-util-find-all-before)
101+
— Find all nodes before another node
102+
* [`unist-util-find-all-between`](https://github.com/mrzmmr/unist-util-find-all-between)
103+
— Find all nodes between two nodes
104+
* [`unist-util-remove`](https://github.com/syntax-tree/unist-util-remove)
92105
— Remove nodes from a tree that pass a test
93-
* [`unist-util-select`](https://github.com/eush77/unist-util-select)
106+
* [`unist-util-select`](https://github.com/syntax-tree/unist-util-select)
94107
— Select nodes with CSS-like selectors
95108

96109
## Contribute
@@ -99,8 +112,8 @@ See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
99112
started.
100113
See [`support.md`][support] for ways to get help.
101114

102-
This project has a [Code of Conduct][coc].
103-
By interacting with this repository, organisation, or community you agree to
115+
This project has a [code of conduct][coc].
116+
By interacting with this repository, organization, or community you agree to
104117
abide by its terms.
105118

106119
## License
@@ -131,7 +144,7 @@ abide by its terms.
131144

132145
[collective]: https://opencollective.com/unified
133146

134-
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
147+
[chat-badge]: https://img.shields.io/badge/chat-spectrum-7b16ff.svg
135148

136149
[chat]: https://spectrum.chat/unified/syntax-tree
137150

0 commit comments

Comments
 (0)