Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-02-22 17:49:14 +0300
committerRyan Dahl <ry@tinyclouds.org>2010-02-22 17:49:14 +0300
commitb8dee2eb204734a473d1dc9d7ea363dcdb28d869 (patch)
treeaaaa8c1356dac5d42cb1006f6b0f467ad6e26d67 /lib/url.js
parentbb0d1e65e1671aaeb21fac186b066701da0bc33b (diff)
camel case variables in url module
Diffstat (limited to 'lib/url.js')
-rw-r--r--lib/url.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/url.js b/lib/url.js
index 49c2e69a868..ce2a5508e04 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -1,7 +1,7 @@
-exports.parse = url_parse;
-exports.resolve = url_resolve;
-exports.resolveObject = url_resolveObject;
-exports.format = url_format;
+exports.parse = urlParse;
+exports.resolve = urlResolve;
+exports.resolveObject = urlResolveObject;
+exports.format = urlFormat;
// define these here so at least they only have to be compiled once on the first module load.
var protocolPattern = /^([a-z0-9]+:)/,
@@ -18,7 +18,7 @@ var protocolPattern = /^([a-z0-9]+:)/,
path = require("path"), // internal module, guaranteed to be loaded already.
querystring = require('querystring');
-function url_parse (url, parseQueryString) {
+function urlParse (url, parseQueryString) {
if (url && typeof(url) === "object" && url.href) return url;
var out = { href : url },
@@ -84,10 +84,10 @@ function url_parse (url, parseQueryString) {
};
// format a parsed object into a url string
-function url_format (obj) {
+function urlFormat (obj) {
// ensure it's an object, and not a string url. If it's an obj, this is a no-op.
// this way, you can call url_format() on strings to clean up potentially wonky urls.
- if (typeof(obj) === "string") obj = url_parse(obj);
+ if (typeof(obj) === "string") obj = urlParse(obj);
var protocol = obj.protocol || "",
host = (obj.host !== undefined) ? obj.host
@@ -122,15 +122,15 @@ function url_format (obj) {
return protocol + host + pathname + search + hash;
};
-function url_resolve (source, relative) {
- return url_format(url_resolveObject(source, relative));
+function urlResolve (source, relative) {
+ return urlFormat(urlResolveObject(source, relative));
};
-function url_resolveObject (source, relative) {
+function urlResolveObject (source, relative) {
if (!source) return relative;
- source = url_parse(url_format(source));
- relative = url_parse(url_format(relative));
+ source = urlParse(urlFormat(source));
+ relative = urlParse(urlFormat(relative));
// hash is always overridden, no matter what.
source.hash = relative.hash;