39 releases (18 breaking)

new 0.30.5 Sep 29, 2024
0.29.0 Sep 13, 2024
0.22.1 Jul 28, 2024
0.0.1 Mar 9, 2024

#12 in #import-export

Download history 164/week @ 2024-06-12 169/week @ 2024-06-19 519/week @ 2024-06-26 529/week @ 2024-07-03 244/week @ 2024-07-10 108/week @ 2024-07-17 265/week @ 2024-07-24 232/week @ 2024-07-31 352/week @ 2024-08-07 203/week @ 2024-08-14 155/week @ 2024-08-21 135/week @ 2024-08-28 169/week @ 2024-09-04 484/week @ 2024-09-11 360/week @ 2024-09-18 676/week @ 2024-09-25

1,824 downloads per month

MIT license

2MB
43K 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–12MB
~116K SLoC