diff options
Diffstat (limited to 'deps/npm/lib/config/nerf-dart.js')
-rw-r--r-- | deps/npm/lib/config/nerf-dart.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/deps/npm/lib/config/nerf-dart.js b/deps/npm/lib/config/nerf-dart.js new file mode 100644 index 0000000000..3b26a56c65 --- /dev/null +++ b/deps/npm/lib/config/nerf-dart.js @@ -0,0 +1,21 @@ +var url = require("url") + +module.exports = toNerfDart + +/** + * 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. + */ +function toNerfDart(uri) { + var parsed = url.parse(uri) + parsed.pathname = "/" + delete parsed.protocol + delete parsed.auth + + return url.format(parsed) +} |