Skip to content

v1.1.2

Compare
Choose a tag to compare
@lukeed lukeed released this 21 Dec 10:23
· 21 commits to master since this release

Performance!

The core of mri has been maintained – improved, in fact – but I applied my learnings over the last 12 months. Since mri was (one of) my first performance-oriented libraries, I am very pleased with the 70% performance gain while maintaining no breaking changes~! 🙌

# Node v10.13.0

minimist     x   324,469 ops/sec ±1.20% (96 runs sampled)
mri (prev)   x   917,360 ops/sec ±1.22% (95 runs sampled)
mri          x 1,611,167 ops/sec ±0.22% (96 runs sampled)
nopt         x   920,029 ops/sec ±1.13% (97 runs sampled)
yargs-parser x    39,542 ops/sec ±1.14% (95 runs sampled)

Patches

General fixes that match minimist behavior:

  • Include opts.default keys within unknown check (#4)
  • Attempt Number cast before moving value into _ array
  • Apply correct interaction between Boolean values & String casting

Chores

  • Updated README
  • Imported more tests from minimist