Skip to content

Commit 9448c22

Browse files
committed
Fix casing
1 parent 9efb82b commit 9448c22

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

lib/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
module.exports = toHAST
3+
module.exports = toHast
44

55
var xtend = require('xtend')
66
var u = require('unist-builder')
@@ -27,8 +27,8 @@ function factory(tree, options) {
2727

2828
return h
2929

30-
/* Finalise the created `right`, a HAST node, from
31-
* `left`, an MDAST node. */
30+
/* Finalise the created `right`, a hast node, from
31+
* `left`, an mdast node. */
3232
function augment(left, right) {
3333
var data
3434
var ctx
@@ -86,8 +86,8 @@ function factory(tree, options) {
8686
}
8787
}
8888

89-
/* Transform `tree`, which is an MDAST node, to a HAST node. */
90-
function toHAST(tree, options) {
89+
/* Transform `tree`, which is an mdast node, to a hast node. */
90+
function toHast(tree, options) {
9191
var h = factory(tree, options)
9292
var node = one(h, tree)
9393
var footnotes = footer(h)

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mdast-util-to-hast",
33
"version": "3.0.3",
4-
"description": "Transform MDAST to HAST",
4+
"description": "Transform mdast to hast",
55
"license": "MIT",
66
"keywords": [
77
"mdast",
@@ -43,8 +43,8 @@
4343
},
4444
"scripts": {
4545
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
46-
"build-bundle": "browserify index.js -s mdastUtilToHAST > mdast-util-to-hast.js",
47-
"build-mangle": "browserify index.js -s mdastUtilToHAST -p tinyify > mdast-util-to-hast.min.js",
46+
"build-bundle": "browserify index.js -s mdastUtilToHast > mdast-util-to-hast.js",
47+
"build-mangle": "browserify index.js -s mdastUtilToHast -p tinyify > mdast-util-to-hast.min.js",
4848
"build": "npm run build-bundle && npm run build-mangle",
4949
"test-api": "node test",
5050
"test-coverage": "nyc --reporter lcov tape test/index.js",

readme.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Downloads][downloads-badge]][downloads]
66
[![Chat][chat-badge]][chat]
77

8-
Transform [MDAST][] to [HAST][].
8+
Transform [mdast][] to [hast][].
99

1010
> **Note**: You probably want to use [remark-rehype][].
1111
@@ -32,13 +32,13 @@ var inspect = require('unist-util-inspect')
3232
var unified = require('unified')
3333
var parse = require('remark-parse')
3434
var vfile = require('to-vfile')
35-
var toHAST = require('mdast-util-to-hast')
35+
var toHast = require('mdast-util-to-hast')
3636

3737
var tree = unified()
3838
.use(parse)
3939
.parse(vfile.readSync('example.md'))
4040

41-
console.log(inspect(toHAST(tree)))
41+
console.log(inspect(toHast(tree)))
4242
```
4343

4444
Which when running with `node example` yields:
@@ -54,9 +54,9 @@ root[1] (1:1-2:1, 0-20)
5454

5555
## API
5656

57-
### `toHAST(node[, options])`
57+
### `toHast(node[, options])`
5858

59-
Transform the given [MDAST][] tree to a [HAST][] tree.
59+
Transform the given [mdast][] tree to a [hast][] tree.
6060

6161
##### Options
6262

@@ -72,7 +72,7 @@ are found. The default behaviour is to prefer the last duplicate definition.
7272

7373
###### `options.handlers`
7474

75-
Object mapping [MDAST nodes][mdast] to functions handling those elements.
75+
Object mapping [mdast nodes][mdast] to functions handling those elements.
7676
Take a look at [`lib/handlers/`][handlers] for examples.
7777

7878
##### Returns
@@ -86,17 +86,17 @@ Take a look at [`lib/handlers/`][handlers] for examples.
8686
* [`position`][unist-position]s are properly patched
8787
* Unknown nodes with `children` are transformed to `div` elements
8888
* Unknown nodes with `value` are transformed to `text` nodes
89-
* [`node.data.hName`][hname] configures the HAST element’s tag-name
90-
* [`node.data.hProperties`][hproperties] is mixed into the HAST element’s
89+
* [`node.data.hName`][hname] configures the hast element’s tag-name
90+
* [`node.data.hProperties`][hproperties] is mixed into the hast element’s
9191
properties
92-
* [`node.data.hChildren`][hchildren] configures the HAST element’s children
92+
* [`node.data.hChildren`][hchildren] configures the hast element’s children
9393

9494
##### Examples
9595

9696
###### `hName`
9797

9898
`node.data.hName` sets the tag-name of an element.
99-
The following [MDAST][]:
99+
The following [mdast][]:
100100

101101
```js
102102
{
@@ -106,7 +106,7 @@ The following [MDAST][]:
106106
}
107107
```
108108

109-
Yields, in [HAST][]:
109+
Yields, in [hast][]:
110110

111111
```js
112112
{
@@ -120,7 +120,7 @@ Yields, in [HAST][]:
120120
###### `hProperties`
121121

122122
`node.data.hProperties` in sets the properties of an element.
123-
The following [MDAST][]:
123+
The following [mdast][]:
124124

125125
```js
126126
{
@@ -132,7 +132,7 @@ The following [MDAST][]:
132132
}
133133
```
134134

135-
Yields, in [HAST][]:
135+
Yields, in [hast][]:
136136

137137
```js
138138
{
@@ -150,7 +150,7 @@ Yields, in [HAST][]:
150150
###### `hChildren`
151151

152152
`node.data.hChildren` sets the children of an element.
153-
The following [MDAST][]:
153+
The following [mdast][]:
154154

155155
```js
156156
{
@@ -171,7 +171,7 @@ The following [MDAST][]:
171171
}
172172
```
173173

174-
Yields, in [HAST][] (**note**: the `pre` and `language-js` class are normal
174+
Yields, in [hast][] (**note**: the `pre` and `language-js` class are normal
175175
`mdast-util-to-hast` functionality):
176176

177177
```js
@@ -199,11 +199,11 @@ Yields, in [HAST][] (**note**: the `pre` and `language-js` class are normal
199199
## Related
200200

201201
* [`mdast-util-to-nlcst`](https://github.com/syntax-tree/mdast-util-to-nlcst)
202-
— Transform MDAST to NLCST
202+
— Transform mdast to nlcst
203203
* [`hast-util-sanitize`](https://github.com/syntax-tree/hast-util-sanitize)
204-
— Sanitize HAST nodes
204+
— Sanitize hast nodes
205205
* [`hast-util-to-mdast`](https://github.com/syntax-tree/hast-util-to-mdast)
206-
— Transform HAST to MDAST
206+
— Transform hast to mdast
207207
* [`remark-rehype`](https://github.com/remarkjs/remark-rehype)
208208
— rehype support for remark
209209
* [`rehype-remark`](https://github.com/rehypejs/rehype-remark)

test/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var test = require('tape')
44
var u = require('unist-builder')
55
var to = require('..')
66

7-
test('toHAST()', function(t) {
7+
test('toHast()', function(t) {
88
t.throws(
99
function() {
1010
to(u('bar', [true]))

0 commit comments

Comments
 (0)