* Did the value come from the option, and not from possible matching dual option? * * @param {*} value * @param {Option} option * @returns {boolean}
(value, option)
| 295 | * @returns {boolean} |
| 296 | */ |
| 297 | valueFromOption(value, option) { |
| 298 | const optionKey = option.attributeName(); |
| 299 | if (!this.dualOptions.has(optionKey)) return true; |
| 300 | |
| 301 | // Use the value to deduce if (probably) came from the option. |
| 302 | const preset = this.negativeOptions.get(optionKey).presetArg; |
| 303 | const negativeValue = preset !== undefined ? preset : false; |
| 304 | return option.negate === (negativeValue === value); |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | /** |
no test coverage detected