Skip to content
Myr

Revert "Add support for optional boolean flag"

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Zhiye Li · committed by Zhiye Li · parent a255fea · Browse files · 3 files+0 added−44 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+0 added−44 removed

  • tests:+0 added−42 removed
  • other:+0 added−2 removed

3 files+0 added−44 removed

deleted:test/test.options.bool.optional.given.js-21 removed
deleted:test/test.options.bool.optional.js-21 removed
modified:index.js-2 removed
387 unmodified lines
388 if (null == val) {389 self[name] = option.bool390 ? defaultValue || true391 : false;392 } else if (option.flags.indexOf('<boolean>') > -1 || option.flags.indexOf('[boolean]') > -1) {393 self[name] = (val === 'true');392 } else {393 self[name] = val;394 }395 } else if (null !== val) {
656 unmodified lines