Server IP : 162.213.251.212 / Your IP : 3.135.209.64 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/allssztx/needapair.com/node_modules/nodemon/lib/help/ |
Upload File : |
var fs = require('fs'); var path = require('path'); const supportsColor = require('supports-color'); module.exports = help; const highlight = supportsColor.stdout ? '\x1B\[$1m' : ''; function help(item) { if (!item) { item = 'help'; } else if (item === true) { // if used with -h or --help and no args item = 'help'; } // cleanse the filename to only contain letters // aka: /\W/g but figured this was eaiser to read item = item.replace(/[^a-z]/gi, ''); try { var dir = path.join(__dirname, '..', '..', 'doc', 'cli', item + '.txt'); var body = fs.readFileSync(dir, 'utf8'); return body.replace(/\\x1B\[(.)m/g, highlight); } catch (e) { return '"' + item + '" help can\'t be found'; } }