Compare mri with minimist and yargs-parser
mastermri is designed to be a faster, more lightweight alternative to existing parsers.
Key Differences from minimist
- Performance:
mriis approximately 5x faster. - Short Flag Groups:
mritreats short flag groups (e.g.,-abc) asBooleans by default, whereasminimistmay treat them as strings or empty values. - Unknown Flags:
mristops parsing immediately upon encountering an unknown flag whenoptions.unknownis used.minimistcontinues parsing. - Parsing Logic:
mriignores newlines, slashBreaks, and dot-nested flags, whereasminimistmay ignore them in specific ways. - Missing Options:
mridoes not supportstopEarlyoropts['--'].
Key Differences from yargs-parser
- Performance:
mriis approximately 40x faster. - Features:
mrilacks severalyargs-parserfeatures includingarray,config,coerce,count,envPrefix,narg,normalize, andnumber. - API:
mridoes not have theparser.detailed()method or aconfigurationobject.