ES Module Imports Parser
JSON →parse-imports is a high-performance JavaScript utility for parsing ES module imports within a given string of code. It leverages the `es-module-lexer` (a WASM-based library) for its core parsing logic, ensuring speed and accuracy. The library is currently at version 3.0.0 and actively maintained, with major versions often introducing updated Node.js runtime requirements. Key features include identifying various module specifier types (e.g., package, relative, absolute, builtin), correctly unescaping specifier sequences, collecting default, named, and namespace imports, and handling dynamic `import()` expressions. It also provides functionality to resolve module specifier paths using `require.resolve`. This makes it a robust tool for static analysis, bundlers, and development tools that need to understand module dependencies.
Traffic · last 30 days ↑233% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · BD · VN