Skip to content

Commit caa4708

Browse files
authored
Update README.md
1 parent 6e8767e commit caa4708

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ This is how the notion page looks for this example:
4646
```js
4747
const { Client } = require("@notionhq/client");
4848
const { NotionToMarkdown } = require("notion-to-md");
49+
// or
50+
// import {NotionToMarkdown} from "notion-to-md";
4951

5052
const notion = new Client({
5153
auth: "your integration token",
@@ -144,14 +146,14 @@ same notion page as before
144146

145147
```js
146148
const { Client } = require("@notionhq/client");
147-
const notion2md = require("notion-to-md");
149+
const { NotionToMarkdown } = require("notion-to-md");
148150

149151
const notion = new Client({
150152
auth: "your integration token",
151153
});
152154

153155
// passing notion client to the option
154-
const n2m = new notion2md({ notionClient: notion });
156+
const n2m = new NotionToMarkdown({ notionClient: notion });
155157

156158
(async () => {
157159
// get all blocks in the page
@@ -174,10 +176,10 @@ const n2m = new notion2md({ notionClient: notion });
174176
- independent of @notionhq/client
175177

176178
```js
177-
const notion2md = require("notion-to-md");
179+
const { NotionToMarkdown } = require("notion-to-md");
178180

179181
// notion client not required
180-
const n2m = new notion2md();
182+
const n2m = new NotionToMarkdown();
181183

182184
const result = n2m.blockToMarkdown(block);
183185
console.log(result);

0 commit comments

Comments
 (0)