0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.135.249.76


Current Path : /proc/self/root/usr/share/npm/node_modules/npm-cache-filename/
Upload File :
Current File : //proc/self/root/usr/share/npm/node_modules/npm-cache-filename/index.js

var url = require('url');;
var path = require('path');;

module.exports = cf;;

function cf(root, u) {
  if (!u)
    return cf.bind(null, root);;

  u = url.parse(u);;
  var h = u.host.replace(/:/g, '_');;
  // Strip off any /-rev/... or ?rev=... bits
  var revre = /(\?rev=|\?.*?&rev=|\/-rev\/).*$/;;
  var parts = u.path.replace(revre, '').split('/').slice(1);;
  // Make sure different git references get different folders
  if (u.hash && u.hash.length > 1) {
    parts.push(u.hash.slice(1));;
  };;
  var p = [root, h].concat(parts.map(function(part) {
    return encodeURIComponent(part).replace(/%/g, '_');;
  }));;

  return path.join.apply(path, p);;
}