change approach again
This commit is contained in:
18
node_modules/command-line-args/lib/value-arg.js
generated
vendored
Normal file
18
node_modules/command-line-args/lib/value-arg.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
'use strict'
|
||||
const t = require('typical')
|
||||
const option = require('./option')
|
||||
const reBeginsWithValueMarker = new RegExp('^' + option.VALUE_MARKER)
|
||||
|
||||
class ValueArg {
|
||||
constructor (value) {
|
||||
this.isOptionValueNotationValue = reBeginsWithValueMarker.test(value)
|
||||
/* if the value marker is present at the value beginning, strip it */
|
||||
this.value = value ? value.replace(reBeginsWithValueMarker, '') : value
|
||||
}
|
||||
|
||||
isDefined () {
|
||||
return t.isDefined(this.value)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ValueArg
|
Reference in New Issue
Block a user