url-transformers
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"scripts": { | ||
@@ -12,0 +12,0 @@ "compile": "rm -rf ./target/ && tsc", |
@@ -18,9 +18,4 @@ "use strict"; | ||
var pipe_1 = require("./helpers/pipe"); | ||
var getPathnameFromParts = function (parts) { return "/" + parts.map(encodeURIComponent).join('/'); }; | ||
var getPartsFromPathname = function (pathname) { | ||
return pathname | ||
.split('/') | ||
.filter(other_1.isNonEmptyString) | ||
.map(decodeURIComponent); | ||
}; | ||
var getPathnameFromParts = function (parts) { return "/" + parts.join('/'); }; | ||
var getPartsFromPathname = function (pathname) { return pathname.split('/').filter(other_1.isNonEmptyString); }; | ||
var parseUrlWithQueryString = function (url) { | ||
@@ -27,0 +22,0 @@ return urlHelpers.parse(url, |
@@ -17,2 +17,3 @@ "use strict"; | ||
assert.strictEqual(index_1.appendPathnameToUrl({ url: '/foo?example' })({ pathnameToAppend: '/bar' }), '/foo/bar?example'); | ||
assert.strictEqual(index_1.appendPathnameToUrl({ url: '/@foo' })({ pathnameToAppend: '/bar' }), '/@foo/bar'); | ||
assert.strictEqual(index_1.replaceHashInUrl({ url: '/foo' })({ newHash: '#bar' }), '/foo#bar'); | ||
@@ -19,0 +20,0 @@ assert.strictEqual(index_1.replaceHashInUrl({ url: '/foo#bar' })({ newHash: undefined }), '/foo'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
17313
192