@blocz/detect-imports
Advanced tools
Comparing version
{ | ||
"name": "@blocz/detect-imports", | ||
"version": "0.1.0-beta.3", | ||
"version": "0.1.0", | ||
"source": "src/index.ts", | ||
@@ -5,0 +5,0 @@ "main": "lib/detect-imports.js", |
# TL;DR | ||
The goal of this library is to detect, in a JS code, the import statements, and parse them. | ||
This is supposed to be used with MDX 1, so TypeScript is not supposed to be parsed (so syntaxes like `import type` or `import { type A }` won't be supported). | ||
## How to use: | ||
### Signature | ||
```ts | ||
detectImports(code: string): Promise<ImportDeclaration[]> | ||
``` | ||
### Example | ||
```js | ||
@@ -4,0 +18,0 @@ import { detectImports } from "@blocz/detect-imports"; |
12223
3.03%59
31.11%