refactor(nerf-dart): use module from npm

This commit is contained in:
Stephan Bönnemann
2015-08-20 14:31:18 +02:00
parent b397ffe91f
commit 810b3533dd
3 changed files with 2 additions and 15 deletions
-14
View File
@@ -1,14 +0,0 @@
// borrowed from https://github.com/npm/npm/blob/master/lib/config/nerf-dart.js
const url = require('url')
/* istanbul ignore next */
module.exports = function toNerfDart (uri) {
let parsed = url.parse(uri)
delete parsed.protocol
delete parsed.auth
delete parsed.query
delete parsed.search
delete parsed.hash
return url.resolve(url.format(parsed), '.')
}