Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
export path.normalizeArray for the uri module
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Dec 22, 2009
1 parent 4dcdfaf commit 120492e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node.js
Expand Up @@ -670,7 +670,7 @@ var pathModule = createInternalModule("path", function (exports) {
return exports.normalize(Array.prototype.join.call(arguments, "/")); return exports.normalize(Array.prototype.join.call(arguments, "/"));
}; };


function normalizeArray (parts) { exports.normalizeArray = function (parts) {
var directories = []; var directories = [];
for (var i = 0; i < parts.length; i++) { for (var i = 0; i < parts.length; i++) {
var directory = parts[i]; var directory = parts[i];
Expand All @@ -688,10 +688,10 @@ var pathModule = createInternalModule("path", function (exports) {
} }
} }
return directories; return directories;
} };


exports.normalize = function (path) { exports.normalize = function (path) {
return normalizeArray(path.split("/")).join("/"); return exports.normalizeArray(path.split("/")).join("/");
}; };


exports.dirname = function (path) { exports.dirname = function (path) {
Expand Down

0 comments on commit 120492e

Please sign in to comment.