mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 01:27:31 -04:00
16 lines
495 B
JavaScript
16 lines
495 B
JavaScript
#!/usr/bin/env node
|
|
var argv = require('yargs')
|
|
.count('verbose')
|
|
.alias('v', 'verbose')
|
|
.argv;
|
|
|
|
VERBOSE_LEVEL = argv.verbose;
|
|
|
|
function WARN() { VERBOSE_LEVEL >= 0 && console.log.apply(console, arguments); }
|
|
function INFO() { VERBOSE_LEVEL >= 1 && console.log.apply(console, arguments); }
|
|
function DEBUG() { VERBOSE_LEVEL >= 2 && console.log.apply(console, arguments); }
|
|
|
|
WARN("Showing only important stuff");
|
|
INFO("Showing semi-important stuff too");
|
|
DEBUG("Extra chatty mode");
|