Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 216 Bytes

section46.2.md

File metadata and controls

13 lines (10 loc) · 216 Bytes

Section 46.2: Passing boolean switches

const options = require("commander");

options
  .option("-v, --verbose")
  .parse(process.argv);

if (options.verbose){
  console.log("Let's make some noise!");
}