Skip to content

Commit b8dee2e

Browse files
committed
camel case variables in url module
1 parent bb0d1e6 commit b8dee2e

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

lib/url.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
exports.parse = url_parse;
2-
exports.resolve = url_resolve;
3-
exports.resolveObject = url_resolveObject;
4-
exports.format = url_format;
1+
exports.parse = urlParse;
2+
exports.resolve = urlResolve;
3+
exports.resolveObject = urlResolveObject;
4+
exports.format = urlFormat;
55

66
// define these here so at least they only have to be compiled once on the first module load.
77
var protocolPattern = /^([a-z0-9]+:)/,
@@ -18,7 +18,7 @@ var protocolPattern = /^([a-z0-9]+:)/,
1818
path = require("path"), // internal module, guaranteed to be loaded already.
1919
querystring = require('querystring');
2020

21-
function url_parse (url, parseQueryString) {
21+
function urlParse (url, parseQueryString) {
2222
if (url && typeof(url) === "object" && url.href) return url;
2323

2424
var out = { href : url },
@@ -84,10 +84,10 @@ function url_parse (url, parseQueryString) {
8484
};
8585

8686
// format a parsed object into a url string
87-
function url_format (obj) {
87+
function urlFormat (obj) {
8888
// ensure it's an object, and not a string url. If it's an obj, this is a no-op.
8989
// this way, you can call url_format() on strings to clean up potentially wonky urls.
90-
if (typeof(obj) === "string") obj = url_parse(obj);
90+
if (typeof(obj) === "string") obj = urlParse(obj);
9191

9292
var protocol = obj.protocol || "",
9393
host = (obj.host !== undefined) ? obj.host
@@ -122,15 +122,15 @@ function url_format (obj) {
122122
return protocol + host + pathname + search + hash;
123123
};
124124

125-
function url_resolve (source, relative) {
126-
return url_format(url_resolveObject(source, relative));
125+
function urlResolve (source, relative) {
126+
return urlFormat(urlResolveObject(source, relative));
127127
};
128128

129-
function url_resolveObject (source, relative) {
129+
function urlResolveObject (source, relative) {
130130
if (!source) return relative;
131131

132-
source = url_parse(url_format(source));
133-
relative = url_parse(url_format(relative));
132+
source = urlParse(urlFormat(source));
133+
relative = urlParse(urlFormat(relative));
134134

135135
// hash is always overridden, no matter what.
136136
source.hash = relative.hash;

0 commit comments

Comments
 (0)