mirror of
https://github.com/flynx/argv.js.git
synced 2025-10-28 10:20:09 +00:00
notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
81a45fd839
commit
f204f02d65
7
argv.js
7
argv.js
@ -922,11 +922,13 @@ object.Constructor('Parser', {
|
|||||||
//
|
//
|
||||||
// .onArgs(callback(args))
|
// .onArgs(callback(args))
|
||||||
//
|
//
|
||||||
// .onNoArgs(callback())
|
// .onNoArgs(callback(args))
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
// NOTE: args is mutable and thus can be modified here affecting
|
||||||
|
// further parsing.
|
||||||
onArgs: afterCallback('onArgs'),
|
onArgs: afterCallback('onArgs'),
|
||||||
onNoArgs: afterCallback('onNoArgs'),
|
onNoArgs: afterCallback('onNoArgs'),
|
||||||
|
|
||||||
|
|
||||||
// Post-parsing callbacks...
|
// Post-parsing callbacks...
|
||||||
//
|
//
|
||||||
@ -999,6 +1001,7 @@ object.Constructor('Parser', {
|
|||||||
script.length - parsed.scriptName.length)
|
script.length - parsed.scriptName.length)
|
||||||
|
|
||||||
// call the pre-parse handlers...
|
// call the pre-parse handlers...
|
||||||
|
// NOTE: these can modify the mutable rest if needed...
|
||||||
rest.length == 0 ?
|
rest.length == 0 ?
|
||||||
this.onNoArgs(rest)
|
this.onNoArgs(rest)
|
||||||
: this.onArgs(rest)
|
: this.onArgs(rest)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user