Skip to content

Commit 42e0216

Browse files
committed
Update dev-dependencies
1 parent c25d628 commit 42e0216

File tree

3 files changed

+45
-45
lines changed

3 files changed

+45
-45
lines changed

lib/index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ function one(state, node) {
134134
}
135135

136136
if (state.file && state.location) {
137-
const doc = String(state.file)
138-
const loc = location(doc)
137+
const document = String(state.file)
138+
const loc = location(document)
139139
const start = loc.toPoint(0)
140-
const end = loc.toPoint(doc.length)
140+
const end = loc.toPoint(document.length)
141141
// Always defined as we give valid input.
142142
assert(start, 'expected `start`')
143143
assert(end, 'expected `end`')
@@ -212,20 +212,20 @@ function element(state, node) {
212212
// Props.
213213
let index = -1
214214
/** @type {Record<string, string>} */
215-
const props = {}
215+
const properties = {}
216216

217217
while (++index < node.attrs.length) {
218218
const attribute = node.attrs[index]
219219
const name =
220220
(attribute.prefix ? attribute.prefix + ':' : '') + attribute.name
221221
if (!own.call(proto, name)) {
222-
props[name] = attribute.value
222+
properties[name] = attribute.value
223223
}
224224
}
225225

226226
// Build.
227-
const fn = state.schema.space === 'svg' ? s : h
228-
const result = fn(node.tagName, props, all(state, node.childNodes))
227+
const x = state.schema.space === 'svg' ? s : h
228+
const result = x(node.tagName, properties, all(state, node.childNodes))
229229
patch(state, node, result)
230230

231231
// Switch content.
@@ -305,14 +305,14 @@ function createLocation(state, node, location) {
305305

306306
if (state.verbose) {
307307
/** @type {Record<string, Position | undefined>} */
308-
const props = {}
308+
const properties = {}
309309
/** @type {string} */
310310
let key
311311

312312
if (location.attrs) {
313313
for (key in location.attrs) {
314314
if (own.call(location.attrs, key)) {
315-
props[find(state.schema, key).property] = position(
315+
properties[find(state.schema, key).property] = position(
316316
location.attrs[key]
317317
)
318318
}
@@ -325,7 +325,7 @@ function createLocation(state, node, location) {
325325
/** @type {ElementData['position']} */
326326
const data = {opening}
327327
if (closing) data.closing = closing
328-
data.properties = props
328+
data.properties = properties
329329

330330
node.data = {position: data}
331331
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@
4242
"web-namespaces": "^2.0.0"
4343
},
4444
"devDependencies": {
45-
"@types/node": "^20.0.0",
46-
"c8": "^8.0.0",
45+
"@types/node": "^22.0.0",
46+
"c8": "^10.0.0",
4747
"is-hidden": "^2.0.0",
4848
"parse5": "^7.0.0",
4949
"prettier": "^3.0.0",
50-
"remark-cli": "^11.0.0",
51-
"remark-preset-wooorm": "^9.0.0",
50+
"remark-cli": "^12.0.0",
51+
"remark-preset-wooorm": "^10.0.0",
5252
"to-vfile": "^8.0.0",
5353
"type-coverage": "^2.0.0",
5454
"typescript": "^5.0.0",
5555
"unist-util-visit": "^5.0.0",
56-
"xo": "^0.55.0"
56+
"xo": "^0.59.0"
5757
},
5858
"scripts": {
5959
"prepack": "npm run build && npm run format",

readme.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212

1313
## Contents
1414

15-
* [What is this?](#what-is-this)
16-
* [When should I use this?](#when-should-i-use-this)
17-
* [Install](#install)
18-
* [Use](#use)
19-
* [API](#api)
20-
* [`fromParse5(tree[, options])`](#fromparse5tree-options)
21-
* [`Options`](#options)
22-
* [`Space`](#space-1)
23-
* [Types](#types)
24-
* [Compatibility](#compatibility)
25-
* [Security](#security)
26-
* [Related](#related)
27-
* [Contribute](#contribute)
28-
* [License](#license)
15+
* [What is this?](#what-is-this)
16+
* [When should I use this?](#when-should-i-use-this)
17+
* [Install](#install)
18+
* [Use](#use)
19+
* [API](#api)
20+
* [`fromParse5(tree[, options])`](#fromparse5tree-options)
21+
* [`Options`](#options)
22+
* [`Space`](#space-1)
23+
* [Types](#types)
24+
* [Compatibility](#compatibility)
25+
* [Security](#security)
26+
* [Related](#related)
27+
* [Contribute](#contribute)
28+
* [License](#license)
2929

3030
## What is this?
3131

@@ -122,10 +122,10 @@ Transform a `parse5` AST to hast.
122122

123123
###### Parameters
124124

125-
* `tree` ([`Parse5Node`][parse5-node])
126-
`parse5` tree to transform
127-
* `options` ([`Options`][api-options], optional)
128-
— configuration
125+
* `tree` ([`Parse5Node`][parse5-node])
126+
`parse5` tree to transform
127+
* `options` ([`Options`][api-options], optional)
128+
— configuration
129129

130130
###### Returns
131131

@@ -235,18 +235,18 @@ Use of `hast-util-from-parse5` can open you up to a
235235
236236
## Related
237237
238-
* [`hast-util-to-parse5`](https://github.com/syntax-tree/hast-util-to-parse5)
239-
— transform hast to Parse5’s AST
240-
* [`hast-util-to-nlcst`](https://github.com/syntax-tree/hast-util-to-nlcst)
241-
— transform hast to nlcst
242-
* [`hast-util-to-mdast`](https://github.com/syntax-tree/hast-util-to-mdast)
243-
— transform hast to mdast
244-
* [`hast-util-to-xast`](https://github.com/syntax-tree/hast-util-to-xast)
245-
— transform hast to xast
246-
* [`mdast-util-to-hast`](https://github.com/syntax-tree/mdast-util-to-hast)
247-
— transform mdast to hast
248-
* [`mdast-util-to-nlcst`](https://github.com/syntax-tree/mdast-util-to-nlcst)
249-
— transform mdast to nlcst
238+
* [`hast-util-to-parse5`](https://github.com/syntax-tree/hast-util-to-parse5)
239+
— transform hast to Parse5’s AST
240+
* [`hast-util-to-nlcst`](https://github.com/syntax-tree/hast-util-to-nlcst)
241+
— transform hast to nlcst
242+
* [`hast-util-to-mdast`](https://github.com/syntax-tree/hast-util-to-mdast)
243+
— transform hast to mdast
244+
* [`hast-util-to-xast`](https://github.com/syntax-tree/hast-util-to-xast)
245+
— transform hast to xast
246+
* [`mdast-util-to-hast`](https://github.com/syntax-tree/mdast-util-to-hast)
247+
— transform mdast to hast
248+
* [`mdast-util-to-nlcst`](https://github.com/syntax-tree/mdast-util-to-nlcst)
249+
— transform mdast to nlcst
250250
251251
## Contribute
252252

0 commit comments

Comments
 (0)