One Hat Cyber Team
Your IP :
10.30.1.1
Server IP :
103.148.201.5
Server :
Linux web-olt 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Server Software :
Apache/2.4.52 (Ubuntu)
PHP Version :
8.1.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
node-commander
/
examples
/
View File Name :
pizza
#!/usr/bin/env node // const { Command } = require('commander'); // (normal include) const { Command } = require('../'); // include commander in git clone of commander repo const program = new Command(); program .description('An application for pizza ordering') .option('-p, --peppers', 'Add peppers') .option('-c, --cheese <type>', 'Add the specified type of cheese', 'marble') .option('-C, --no-cheese', 'You do not want any cheese'); program.parse(); const options = program.opts(); console.log('you ordered a pizza with:'); if (options.peppers) console.log(' - peppers'); const cheese = !options.cheese ? 'no' : options.cheese; console.log(' - %s cheese', cheese); // Try the following on macOS or Linux: // ./pizza --help // // Try the following: // ./pizza --help // node pizza --peppers --cheese=blue // node pizza --no-cheese