PHP 8.2.30
Preview: nerf-dart.js Size: 450 B
//opt/alt/alt-nodejs19/root/lib/node_modules/npm/node_modules/@npmcli/config/lib/nerf-dart.js

const { URL } = require('url')

/**
 * Maps a URL to an identifier.
 *
 * Name courtesy schiffertronix media LLC, a New Jersey corporation
 *
 * @param {String} uri The URL to be nerfed.
 *
 * @returns {String} A nerfed URL.
 */
module.exports = (url) => {
  const parsed = new URL(url)
  const from = `${parsed.protocol}//${parsed.host}${parsed.pathname}`
  const rel = new URL('.', from)
  const res = `//${rel.host}${rel.pathname}`
  return res
}

Directory Contents

Dirs: 0 × Files: 9

Name Size Perms Modified Actions
414 B lrw-r--r-- 2023-12-06 18:07:50
Edit Download
677 B lrw-r--r-- 2023-12-06 18:07:50
Edit Download
28.25 KB lrw-r--r-- 2023-12-06 18:07:50
Edit Download
450 B lrw-r--r-- 2023-12-06 18:07:50
Edit Download
2.17 KB lrw-r--r-- 2023-12-06 18:07:50
Edit Download
3.44 KB lrw-r--r-- 2023-12-06 18:07:50
Edit Download
1.31 KB lrw-r--r-- 2023-12-06 18:07:50
Edit Download
574 B lrw-r--r-- 2023-12-06 18:07:50
Edit Download
691 B lrw-r--r-- 2023-12-06 18:07:50
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).