pkgjs / parseargs

Polyfill of `util.parseArgs()`
Apache License 2.0
121 stars 9 forks source link

docs: add example example with code from README/documentation #130

Closed shadowspawn closed 2 years ago

shadowspawn commented 2 years ago

A pattern I use in Commander is putting all example programs from the documentation into example files with imports so they can be run straight from a checkout of the repo. I find it useful myself to check behaviour matches documentation, besides letting users try them out easily.

This PR adds an example file matching an upstream documentation example, see what you think...

(I do also add examples that don't appear in the documentation for samples of features or usage that are not covered in depth in the README, which we could do here too.)