Server IP : 108.163.255.210 / Your IP : 3.129.216.248 Web Server : Apache System : Linux blossom.urlnameserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64 User : ( 1172) PHP Version : 7.2.34 Disable Function : eval,escapeshellarg,proc_close,proc_get_status,proc_nice,proc_open,symlink,system,pcntl_exec,getrusage,chown,chgp,closelog,openlog,syslog,define_syslog_variables,php_ini_loaded_file,getservbyname,getservbyport,posix_getgid,posix_getgrgid,proc_terminate,pfsockopen,apache_child_terminate,posix_mkfifo,posix_setpgid,posix_setuid,hypot,pg_host,pos,posix_access,posix_getcwd,posix_getservbyname,myshellexec,getpid,posix_getsid,posix_isatty,posix_kill,posix_mknod,posix_setgid,posix_setsid,posix_setuid,posix_times,posix_uname,ps_fill,posix_getpwuid,global,ini_restore,zip_open,zip_read,rar_open,bzopen,bzread,bzwrite,apache_get_modules,apache_get_version,phpversionphpinfo,php_ini_scanned_files,get_current_user,disk_total_space,diskfreespace,leak,imap_list,hypo,filedump,safe_mode,getmygid,apache_getenv,apache_setenv,bzread,bzwrite,bzopen,phpini,higlight_file,dos_conv,get_cwd,er_log,cmd,e_name,vdir,get_dir,only_read,ftok,ftpexec,posix_getpwnam,mysql_list_dbs,disk_free_space,session_save_path,confirm_phpdoc_compiled,zip_entry_rea,php_u,psockopen,crack_opendict,crack_getlastmessage,crack_closedict,crack_check,fpassthru,posix_get_last_error,posix_getlogin,posix_getgroups,posix_strerror,posix_getrlimit,posix_getpgrp,posix_getgrnam,pos,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/unilinki/public_html/goodmoreearnings.com/nnm/node_modules/which/ |
Upload File : |
module.exports = which which.sync = whichSync var isWindows = process.platform === 'win32' || process.env.OSTYPE === 'cygwin' || process.env.OSTYPE === 'msys' var path = require('path') var COLON = isWindows ? ';' : ':' var isexe = require('isexe') function getNotFoundError (cmd) { var er = new Error('not found: ' + cmd) er.code = 'ENOENT' return er } function getPathInfo (cmd, opt) { var colon = opt.colon || COLON var pathEnv = opt.path || process.env.PATH || '' var pathExt = [''] pathEnv = pathEnv.split(colon) var pathExtExe = '' if (isWindows) { pathEnv.unshift(process.cwd()) pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') pathExt = pathExtExe.split(colon) // Always test the cmd itself first. isexe will check to make sure // it's found in the pathExt set. if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') pathExt.unshift('') } // If it has a slash, then we don't bother searching the pathenv. // just check the file itself, and that's it. if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) pathEnv = [''] return { env: pathEnv, ext: pathExt, extExe: pathExtExe } } function which (cmd, opt, cb) { if (typeof opt === 'function') { cb = opt opt = {} } var info = getPathInfo(cmd, opt) var pathEnv = info.env var pathExt = info.ext var pathExtExe = info.extExe var found = [] ;(function F (i, l) { if (i === l) { if (opt.all && found.length) return cb(null, found) else return cb(getNotFoundError(cmd)) } var pathPart = pathEnv[i] if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1) var p = path.join(pathPart, cmd) if (!pathPart && (/^\.[\\\/]/).test(cmd)) { p = cmd.slice(0, 2) + p } ;(function E (ii, ll) { if (ii === ll) return F(i + 1, l) var ext = pathExt[ii] isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { if (!er && is) { if (opt.all) found.push(p + ext) else return cb(null, p + ext) } return E(ii + 1, ll) }) })(0, pathExt.length) })(0, pathEnv.length) } function whichSync (cmd, opt) { opt = opt || {} var info = getPathInfo(cmd, opt) var pathEnv = info.env var pathExt = info.ext var pathExtExe = info.extExe var found = [] for (var i = 0, l = pathEnv.length; i < l; i ++) { var pathPart = pathEnv[i] if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1) var p = path.join(pathPart, cmd) if (!pathPart && /^\.[\\\/]/.test(cmd)) { p = cmd.slice(0, 2) + p } for (var j = 0, ll = pathExt.length; j < ll; j ++) { var cur = p + pathExt[j] var is try { is = isexe.sync(cur, { pathExt: pathExtExe }) if (is) { if (opt.all) found.push(cur) else return cur } } catch (ex) {} } } if (opt.all && found.length) return found if (opt.nothrow) return null throw getNotFoundError(cmd) }