Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 18.218.5.91
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/npm/node_modules/hosted-git-info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/npm/node_modules/hosted-git-info/git-host.js
'use strict'
var gitHosts = require('./git-host-info.js')

var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation) {
  var gitHostInfo = this
  gitHostInfo.type = type
  Object.keys(gitHosts[type]).forEach(function (key) {
    gitHostInfo[key] = gitHosts[type][key]
  })
  gitHostInfo.user = user
  gitHostInfo.auth = auth
  gitHostInfo.project = project
  gitHostInfo.committish = committish
  gitHostInfo.default = defaultRepresentation
}
GitHost.prototype = {}

GitHost.prototype.hash = function () {
  return this.committish ? '#' + this.committish : ''
}

GitHost.prototype._fill = function (template, vars) {
  if (!template) return
  if (!vars) vars = {}
  var self = this
  Object.keys(this).forEach(function (key) {
    if (self[key] != null && vars[key] == null) vars[key] = self[key]
  })
  var rawAuth = vars.auth
  var rawComittish = vars.committish
  Object.keys(vars).forEach(function (key) {
    vars[key] = encodeURIComponent(vars[key])
  })
  vars['auth@'] = rawAuth ? rawAuth + '@' : ''
  vars['#committish'] = rawComittish ? '#' + rawComittish : ''
  vars['/tree/committish'] = vars.committish
                          ? '/' + vars.treepath + '/' + vars.committish
                          : ''
  vars['/committish'] = vars.committish ? '/' + vars.committish : ''
  vars.committish = vars.committish || 'master'
  var res = template
  Object.keys(vars).forEach(function (key) {
    res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key])
  })
  return res
}

GitHost.prototype.ssh = function () {
  return this._fill(this.sshtemplate)
}

GitHost.prototype.sshurl = function () {
  return this._fill(this.sshurltemplate)
}

GitHost.prototype.browse = function () {
  return this._fill(this.browsetemplate)
}

GitHost.prototype.docs = function () {
  return this._fill(this.docstemplate)
}

GitHost.prototype.bugs = function () {
  return this._fill(this.bugstemplate)
}

GitHost.prototype.https = function () {
  return this._fill(this.httpstemplate)
}

GitHost.prototype.git = function () {
  return this._fill(this.gittemplate)
}

GitHost.prototype.shortcut = function () {
  return this._fill(this.shortcuttemplate)
}

GitHost.prototype.path = function () {
  return this._fill(this.pathtemplate)
}

GitHost.prototype.file = function (P) {
  return this._fill(this.filetemplate, {
    path: P.replace(/^[/]+/g, '')
  })
}

GitHost.prototype.getDefaultRepresentation = function () {
  return this.default
}

GitHost.prototype.toString = function () {
  return (this[this.default] || this.sshurl).call(this)
}

Anon7 - 2022
AnonSec Team