Skip to content

Commit 4bae606

Browse files
committed
Updated parameters to return "null" rather than empty string if not set at all
1 parent 0cbd48e commit 4bae606

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

jquery/jquery-url.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jQuery.extend(
5454
param = params[i].split('=');
5555
if(param[0] === arg) return param[1];
5656
}
57+
58+
return null;
5759
}
5860

5961
return '';

js-url.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @license This websanova JavaScript url is dual licensed under the MIT and GPL licenses.
99
* @link http://www.websanova.com
1010
* @github http://github.com/websanova/js-url
11-
* @version 1.7.5
11+
* @version 1.7.6
1212
*
1313
******************************************/
1414

@@ -71,6 +71,8 @@ window.url = (function() {
7171
param = params[i].split('=');
7272
if(param[0] === arg) return param[1];
7373
}
74+
75+
return null;
7476
}
7577

7678
return '';

js-url.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-url",
3-
"version": "1.7.1",
3+
"version": "1.7.5",
44
"description": "A simple, lightweight url parser for JavaScript (~1.6 Kb minified, ~0.6Kb gzipped).",
55
"main": "js-url.js",
66
"repository": {

url.jquery.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "url",
33
"title": "url jQuery Plugin",
4-
"description": "A jQuery url plugin",
4+
"description": "A jQuery url plugin by Websanova",
55
"keywords": [
66
"websanova",
77
"url"
88
],
9-
"version": "1.7.5",
9+
"version": "1.7.6",
1010
"author": {
1111
"name": "Websanova",
1212
"email": "rob@websanova.com",

0 commit comments

Comments
 (0)