File tree 3 files changed +27
-25
lines changed
3 files changed +27
-25
lines changed Original file line number Diff line number Diff line change 1
- /**
2
- * @typedef {import('hast').Element } Element
3
- */
4
-
5
- import { convertElement } from 'hast-util-is-element'
6
-
7
- /**
8
- * Check if a node is a heading element (includes `hgroup`!).
9
- *
10
- * @type {import('hast-util-is-element').AssertPredicate<Element & {tagName: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'hgroup'}> }
11
- * @param node
12
- * Node to check.
13
- * @returns
14
- * Whether node is a heading (`h1` through `h6`, and `hgroup`).
15
- */
16
- // @ts -expect-error Sure, the assertion matches.
17
- export const heading = convertElement ( [
18
- 'h1' ,
19
- 'h2' ,
20
- 'h3' ,
21
- 'h4' ,
22
- 'h5' ,
23
- 'h6' ,
24
- 'hgroup'
25
- ] )
1
+ export { heading } from './lib/index.js'
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @typedef {import('hast').Element } Element
3
+ */
4
+
5
+ import { convertElement } from 'hast-util-is-element'
6
+
7
+ /**
8
+ * Check if a node is a heading element (includes `hgroup`!).
9
+ *
10
+ * @type {import('hast-util-is-element').AssertPredicate<Element & {tagName: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'hgroup'}> }
11
+ * @param node
12
+ * Node to check.
13
+ * @returns
14
+ * Whether node is a heading (`h1` through `h6`, and `hgroup`).
15
+ */
16
+ // @ts -expect-error Sure, the assertion matches.
17
+ export const heading = convertElement ( [
18
+ 'h1' ,
19
+ 'h2' ,
20
+ 'h3' ,
21
+ 'h4' ,
22
+ 'h5' ,
23
+ 'h6' ,
24
+ 'hgroup'
25
+ ] )
Original file line number Diff line number Diff line change 28
28
"main" : " index.js" ,
29
29
"types" : " index.d.ts" ,
30
30
"files" : [
31
+ " lib/" ,
31
32
" index.d.ts" ,
32
33
" index.js"
33
34
],
You can’t perform that action at this time.
0 commit comments