]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/lib/config/nerf-dart.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / lib / config / nerf-dart.js
1 var url = require("url")
2
3 module.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  */
14 function 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 }