url-assembler
Advanced tools
Comparing version 1.2.10 to 2.0.0
@@ -93,3 +93,3 @@ var extend = require('extend'); | ||
var symbol = ':' + key; | ||
chainable.pathname = this.pathname.replace(symbol, encodeURI(value)); | ||
chainable.pathname = this.pathname.replace(symbol, encodeURIComponent(value)); | ||
if (!strict && chainable.pathname === previous) { | ||
@@ -102,3 +102,3 @@ return chainable.query(key, value); | ||
function _multiParam (chainable, hash, strict) { | ||
for (key in hash) { | ||
for (var key in hash) { | ||
chainable = chainable.param(key, hash[key], strict); | ||
@@ -105,0 +105,0 @@ } |
{ | ||
"name": "url-assembler", | ||
"version": "1.2.10", | ||
"version": "2.0.0", | ||
"description": "Assemble urls from route-like templates (/path/:param)", | ||
@@ -37,5 +37,5 @@ "main": "index.js", | ||
"chai": "^1.10.0", | ||
"coveralls": "^2.11.2", | ||
"istanbul": "^0.3.3", | ||
"mocha": "^2.0.1", | ||
"coveralls": "^3.0.2", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^5.2.0", | ||
"proxyquire": "^1.4.0", | ||
@@ -42,0 +42,0 @@ "sinon": "^1.14.1" |
@@ -100,3 +100,3 @@ var expect = require('chai').expect | ||
var expected = 'http://example.com' | ||
+ "/search/-_.!~*'()%20/;,%3F:@&=+$_abc_%E6%97%A5%E6%9C%AC%E8%AA%9E" | ||
+ "/search/-_.!~*'()%20%2F%3B%2C%3F%3A%40%26%3D%2B%24_abc_%E6%97%A5%E6%9C%AC%E8%AA%9E" | ||
myUrl = UrlAssembler('http://example.com') | ||
@@ -103,0 +103,0 @@ .segment('/search/:p') |
Sorry, the diff of this file is not supported yet
24778