0.1.0 • Published 2 years ago
@blocz/detect-imports v0.1.0
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
2 years ago
0.1.0-beta.2
2 years ago
0.1.0-beta.1
2 years ago
0.1.0-beta.0
2 years ago
0.1.0
2 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.5
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.3
4 years ago
0.0.4
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago
0.0.0
4 years ago