Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jun 30, 2024
1 parent 37db33f commit fd1a029
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions docs/src/content/docs/reference/scripts/imports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ You can import module installed in your project.

```js
import { parse } from "ini"
...
export default async function () {
// static import
const res = parse("x = 1\ny = 2")
console.log(res)

// dynamic import
const { stringify } = await import("ini")
console.log(stringify(res))
}

// static import
const res = parse("x = 1\ny = 2")
console.log(res)

// dynamic import with top-level await
const { stringify } = await import("ini")
console.log(stringify(res))
```

## File imports
Expand Down

0 comments on commit fd1a029

Please sign in to comment.