substack/node-optimist — pull request #94 by brettpaden (2013-04-30 13:37:41+00:00)
Title: pass aliases object to check functions.

Simple change that adds flexibility to the check functions. In my case, I wanted to support a "strict" mode based on the aliases, disallowing anything passed on the command line other than options defined there. Prevents fat finger abuse :-)

For example:

```
.check(function(argv, aliases) {
for (var i in Object.keys(argv)) {
var key = argv[i];
if (!aliases[key] && key !== '_' && key !== '$0') {
return false;
}
}
return true;
});
```