1var url = require('url') 2 3module.exports = toNerfDart 4 5/** 6 * Maps a URL to an identifier. 7 * 8 * Name courtesy schiffertronix media LLC, a New Jersey corporation 9 * 10 * @param {String} uri The URL to be nerfed. 11 * 12 * @returns {String} A nerfed URL. 13 */ 14function toNerfDart (uri) { 15 var parsed = url.parse(uri) 16 delete parsed.protocol 17 delete parsed.auth 18 delete parsed.query 19 delete parsed.search 20 delete parsed.hash 21 22 return url.resolve(url.format(parsed), '.') 23} 24