Skip to content

Commit 2beb724

Browse files
committed
Refactor to move implementation to lib/
1 parent bd2841c commit 2beb724

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed

index.js

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1 @@
1-
/**
2-
* @typedef {import('mdast').PhrasingContent} PhrasingContent
3-
* @typedef {import('unist-util-is').AssertPredicate<PhrasingContent>} AssertPredicatePhrasing
4-
*/
5-
6-
import {convert} from 'unist-util-is'
7-
8-
export const phrasing = /** @type {AssertPredicatePhrasing} */ (
9-
convert([
10-
'break',
11-
'delete',
12-
'emphasis',
13-
'footnote',
14-
'footnoteReference',
15-
'image',
16-
'imageReference',
17-
'inlineCode',
18-
'link',
19-
'linkReference',
20-
'strong',
21-
'text'
22-
])
23-
)
1+
export {phrasing} from './lib/index.js'

lib/index.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* @typedef {import('mdast').PhrasingContent} PhrasingContent
3+
* @typedef {import('unist-util-is').AssertPredicate<PhrasingContent>} AssertPredicatePhrasing
4+
*/
5+
6+
import {convert} from 'unist-util-is'
7+
8+
export const phrasing = /** @type {AssertPredicatePhrasing} */ (
9+
convert([
10+
'break',
11+
'delete',
12+
'emphasis',
13+
'footnote',
14+
'footnoteReference',
15+
'image',
16+
'imageReference',
17+
'inlineCode',
18+
'link',
19+
'linkReference',
20+
'strong',
21+
'text'
22+
])
23+
)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"main": "index.js",
2929
"types": "index.d.ts",
3030
"files": [
31+
"lib/",
3132
"index.d.ts",
3233
"index.js"
3334
],

0 commit comments

Comments
 (0)