Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf2c1c9c

Browse files
committed
Refactor docs
1 parentc768728 commitf2c1c9c

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

‎readme.md‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ looking for!
3838
##Install
3939

4040
This package is[ESM only][esm].
41-
In Node.js (version14.14+ and 16.0+), install with[npm][]:
41+
In Node.js (version16+), install with[npm][]:
4242

4343
```sh
4444
npm install hast-util-whitespace
@@ -83,7 +83,7 @@ whitespace({
8383

8484
##API
8585

86-
This package exports the identifier[`whitespace`][whitespace].
86+
This package exports the identifier[`whitespace`][api-whitespace].
8787
There is no default export.
8888

8989
###`whitespace(thing)`
@@ -110,10 +110,13 @@ It exports no additional types.
110110

111111
##Compatibility
112112

113-
Projects maintained by the unified collective are compatible withallmaintained
113+
Projects maintained by the unified collective are compatible with maintained
114114
versions of Node.js.
115-
As of now, that is Node.js 14.14+ and 16.0+.
116-
Our projects sometimes work with older versions, but this is not guaranteed.
115+
116+
When we cut a new major release, we drop support for unmaintained versions of
117+
Node.
118+
This means we try to keep the current release line,`hast-util-whitespace@^2`,
119+
compatible with Node.js 12.
117120

118121
##Security
119122

@@ -144,7 +147,7 @@ for [cross-site scripting (XSS)][xss] attacks.
144147
— check if a node is a script-supporting element
145148
*[`hast-util-is-body-ok-link`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-is-body-ok-link)
146149
— check if a node is “Body OK” link element
147-
*[`hast-util-is-conditional-comment`](https://github.com/rehypejs/rehype-minify/tree/HEAD/packages/hast-util-is-conditional-comment)
150+
*[`hast-util-is-conditional-comment`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-is-conditional-comment)
148151
— check if a node is a conditional comment
149152
*[`hast-util-is-css-link`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-is-css-link)
150153
— check if a node is a CSS link element
@@ -181,9 +184,9 @@ abide by its terms.
181184

182185
[downloads]:https://www.npmjs.com/package/hast-util-whitespace
183186

184-
[size-badge]:https://img.shields.io/bundlephobia/minzip/hast-util-whitespace.svg
187+
[size-badge]:https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-whitespace
185188

186-
[size]:https://bundlephobia.com/result?p=hast-util-whitespace
189+
[size]:https://bundlejs.com/?q=hast-util-whitespace
187190

188191
[sponsors-badge]:https://opencollective.com/unified/sponsors/badge.svg
189192

@@ -225,4 +228,4 @@ abide by its terms.
225228

226229
[xss]:https://en.wikipedia.org/wiki/Cross-site_scripting
227230

228-
[whitespace]:#whitespacething
231+
[api-whitespace]:#whitespacething

‎test.js‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@ test('whitespace', async function (t) {
1313
assert.equal(whitespace({type:'comment',value:'asd'}),false)
1414
})
1515

16-
awaitt.test(
17-
'should return `false` for other white-space',
18-
asyncfunction(){
19-
assert.equal(whitespace({type:'text',value:'\v'}),false)
20-
}
21-
)
16+
awaitt.test('should return `false` for other whitespace',asyncfunction(){
17+
assert.equal(whitespace({type:'text',value:'\v'}),false)
18+
})
2219

2320
awaitt.test(
24-
'should return `true` for inter-elementwhite-space',
21+
'should return `true` for inter-elementwhitespace',
2522
asyncfunction(){
2623
assert.equal(whitespace({type:'text',value:' \t\r\n\f'}),true)
2724
}
@@ -35,7 +32,7 @@ test('whitespace', async function (t) {
3532
)
3633

3734
awaitt.test(
38-
'should return `true` for a `string` of inter-elementwhite-space',
35+
'should return `true` for a `string` of inter-elementwhitespace',
3936
asyncfunction(){
4037
assert.equal(whitespace(' \t\r\n\f'),true)
4138
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp