How lukeed/mri works
mri is a small JavaScript library that parses CLI argument arrays into an argv object. A caller supplies arguments and optional alias, type-casting, default, and unknown-flag options; the parser normalizes options, scans tokens, and returns the result. The implementation also delegates option normalization and value conversion to helpers in the same source file. The callback relationship is supported by the implementation, though its use is optional. This map focuses on runtime behavior, not build or test tooling.
Main entry points: index.js Argument parser
Components 5
Other components
- CLI caller
- Argument parser
src/index.js - Option normalization
src/index.js - Value conversion
src/index.js - Unknown callback
Connections 5
- CLI caller → Argument parser: passes arguments
readme.md - Argument parser → Option normalization: normalizes options
src/index.js - Argument parser → Value conversion: converts values
src/index.js - Argument parser → Unknown callback: calls on unknown
src/index.js - Argument parser → CLI caller: returns argv
src/index.js