Skip to content

Commit f4963c2

Browse files
committed
chore: update README
1 parent f57c6e5 commit f4963c2

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# import-string
1+
<p align="center">
2+
<img src="docs/import-string.svg" alt="import-string logo" width="120" height="140" />
3+
</p>
4+
5+
<h1 align="center">import-string</h1>
26

37
This package allow us to import code from simple string, with support to:
48

@@ -50,6 +54,19 @@ async function main() {
5054
}
5155
```
5256

57+
### 🔧 Options
58+
59+
The `importModule` function accepts an options object as its second parameter:
60+
61+
```typescript
62+
import { importModule } from 'import-string';
63+
64+
const mod = await importModule(stringSrc, {
65+
target: 'es2018',
66+
loader: 'ts',
67+
});
68+
```
69+
5370
### 💻 Development
5471

5572
1. Clone this repository

docs/import-string.svg

+9
Loading

0 commit comments

Comments
 (0)