mirror of
https://github.com/thangisme/notes.git
synced 2026-07-30 23:20:38 -04:00
Initial commit
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
#!/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");
|
||||
Reference in New Issue
Block a user