ES Module Imports Parser

JSON →
library 3.0.0 ·javascript
verified May 27, 2026

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.

total hits 27
actors 9 distinct systems
last hit 1d ago MetaBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
ChatGPT-User
1
Search engines
1
Humans
4

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · BD · VN