0.1.0 • Published 4 years ago

@blocz/detect-imports v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

TL;DR

import { detectImports } from "@blocz/detect-imports";

const string = `
import { a, A as As } from './a';
import { B,
    b } from 'b'

const nonImport = 'nonImport';
`;

await detectImports(string);
// This will return:
// [
//     {
//         imports: [
//             {
//                 imported: "a",
//                 local: "a",
//             },
//             {
//                 imported: "A",
//                 local: "As",
//             },
//         ],
//         module: "./a",
//     },
//     {
//         imports: [
//             {
//                 imported: "B",
//                 local: "B",
//             },
//             {
//                 imported: "b",
//                 local: "b",
//             },
//         ],
//         module: "b",
//     },
// ];
0.1.0-beta.3

4 years ago

0.1.0-beta.2

4 years ago

0.1.0-beta.1

4 years ago

0.1.0-beta.0

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.3

5 years ago

0.0.4

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago