"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/lib/config/nerf-dart.js" (11 Apr 2017, 471 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 }