vvakame / commandpost

command line option parser for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accept mapping function in option(...)

TedDriggs opened this issue · comments

I'd like to do some parsing of a string option before it gets to my runner method. Right now, this requires that I create an interface to accept the string list, then a second interface to hold the parsed result. I'd like some way of passing a function to mapper with the signature (values: string[]) => T, and have that function called before the action is invoked.