🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

urlparse-template

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urlparse-template - npm Package Compare versions

Comparing version

to
0.1.0

2

lib/index.js

@@ -24,3 +24,3 @@ var ut = require('url-template'),

Object.keys(res).forEach(function (k) {
if (typeof res[k] === 'string') {
if (k !== 'href' && k !== 'path' && k !== 'pathname' && typeof res[k] === 'string') {
res[k] = decodeURIComponent(res[k]);

@@ -27,0 +27,0 @@ }

{
"name": "urlparse-template",
"version": "0.0.2",
"version": "0.1.0",
"description": "Template-based URL-parsing",

@@ -12,3 +12,3 @@ "main": "lib/index.js",

},
"repository": "https://github.com/msiebuhr/node-urlparse-tempate.git",
"repository": "https://github.com/msiebuhr/node-urlparse-template.git",
"keywords": [

@@ -15,0 +15,0 @@ "url",

@@ -64,1 +64,9 @@ var assert = require('chai').assert,

});
describe('does not touch the non-atomic parts of the parsed url', function () {
var tpl = p('http://foo.com/{?url}');
it('leaves chars encoded by url-template alone in href', function () {
var out = tpl({url: 'http://bar.com/?quux=baz&blah=blerg'});
assert.propertyVal(out, 'href', 'http://foo.com/?url=http%3A%2F%2Fbar.com%2F%3Fquux%3Dbaz%26blah%3Dblerg');
});
});