47 releases (26 breaking)

0.38.0 Nov 26, 2024
0.36.0 Nov 9, 2024
0.22.1 Jul 28, 2024
0.0.1 Mar 9, 2024

#30 in #import-export

Download history 318/week @ 2024-08-18 12/week @ 2024-08-25 292/week @ 2024-09-01 260/week @ 2024-09-08 303/week @ 2024-09-15 719/week @ 2024-09-22 367/week @ 2024-09-29 166/week @ 2024-10-06 102/week @ 2024-10-13 267/week @ 2024-10-20 45/week @ 2024-10-27 195/week @ 2024-11-03 61/week @ 2024-11-10 122/week @ 2024-11-17 157/week @ 2024-11-24 14/week @ 2024-12-01

413 downloads per month

MIT license

2MB
47K SLoC

Oxc Module Lexer

This is not a lexer. The name "lexer" is used for easier recognition.

es-module-lexer

Outputs the list of exports and locations of import specifiers, including dynamic import and import meta handling.

Does not have any limitations mentioned in es-module-lexer.

cjs-module-lexer

  • TODO

Benchmark

This is 2 times slower than es-module-lexer, but will be significantly faster when TypeScript is processed.

The difference is around 10ms vs 20ms on a large file (700k).


lib.rs:

ESM module lexer

Dependencies

~6–11MB
~116K SLoC