Skip to content

Commit a654642

Browse files
committed
[#6] Use named export
#6
1 parent 8a99908 commit a654642

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
import Chance from "chance";
66
import { u } from "unist-builder";
77

8-
import convert from ".";
8+
import { fromADF as convert } from ".";
99

1010
const seed = process.env.SEED;
1111
const random = seed ? new Chance(seed) : new Chance();

index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ function assert(value: unknown, message = ""): asserts value {
263263
if (!value) throw new AssertionError(message);
264264
}
265265

266-
export default function convert(doc: ADFDoc): MDASTRoot {
266+
function convert(doc: ADFDoc): MDASTRoot {
267267
assert(doc.version === 1, `unknown document version ${doc.version}`);
268268

269269
const tree: MDASTRoot = u("root", []);
@@ -290,3 +290,5 @@ export default function convert(doc: ADFDoc): MDASTRoot {
290290

291291
return tree;
292292
}
293+
294+
export const fromADF = convert;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdast-util-from-adf",
3-
"version": "1.1.0",
3+
"version": "2.0.0-pre",
44
"description": "Convert from Atlassian Document Format to Markdown Abstract Syntax Tree",
55
"license": "MIT",
66
"author": "",

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ npm install mdast-util-from-adf
2020
Say we have the following script, `example.js`:
2121

2222
```js
23-
import fromADF from "mdast-util-from-adf";
23+
import { fromADF } from "mdast-util-from-adf";
2424
import { toMarkdown } from "mdast-util-to-markdown";
2525

2626
const doc = {

0 commit comments

Comments
 (0)