Skip to content

Commit

Permalink
Refactor to move implementation to lib/
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jan 25, 2023
1 parent bd2841c commit 2beb724
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
24 changes: 1 addition & 23 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1 @@
/**
* @typedef {import('mdast').PhrasingContent} PhrasingContent
* @typedef {import('unist-util-is').AssertPredicate<PhrasingContent>} AssertPredicatePhrasing
*/

import {convert} from 'unist-util-is'

export const phrasing = /** @type {AssertPredicatePhrasing} */ (
convert([
'break',
'delete',
'emphasis',
'footnote',
'footnoteReference',
'image',
'imageReference',
'inlineCode',
'link',
'linkReference',
'strong',
'text'
])
)
export {phrasing} from './lib/index.js'
23 changes: 23 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* @typedef {import('mdast').PhrasingContent} PhrasingContent
* @typedef {import('unist-util-is').AssertPredicate<PhrasingContent>} AssertPredicatePhrasing
*/

import {convert} from 'unist-util-is'

export const phrasing = /** @type {AssertPredicatePhrasing} */ (
convert([
'break',
'delete',
'emphasis',
'footnote',
'footnoteReference',
'image',
'imageReference',
'inlineCode',
'link',
'linkReference',
'strong',
'text'
])
)
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"main": "index.js",
"types": "index.d.ts",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
Expand Down

0 comments on commit 2beb724

Please sign in to comment.