aboutsummaryrefslogtreecommitdiff
path: root/src/library_path.js
diff options
context:
space:
mode:
authorAnthony Pesch <inolen@gmail.com>2013-08-07 14:45:19 -0700
committerAnthony Pesch <inolen@gmail.com>2013-08-07 14:45:19 -0700
commitb4c6de08f555c4433bd689ebf7475eca5455062f (patch)
tree37ee1a186f26b2eb2caeb4a234aeb7437362da89 /src/library_path.js
parenta34aed0fb8a553dbd476b1a21eb96fcbf2dab57f (diff)
updated bad function formatting
Diffstat (limited to 'src/library_path.js')
-rw-r--r--src/library_path.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/library_path.js b/src/library_path.js
index feec1e68..2c2c016a 100644
--- a/src/library_path.js
+++ b/src/library_path.js
@@ -3,11 +3,11 @@ mergeInto(LibraryManager.library, {
$PATH: {
// split a filename into [root, dir, basename, ext], unix version
// 'root' is just a slash, or nothing.
- splitPath: function (filename) {
+ splitPath: function(filename) {
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
return splitPathRe.exec(filename).slice(1);
},
- normalizeArray: function (parts, allowAboveRoot) {
+ normalizeArray: function(parts, allowAboveRoot) {
// if the path tries to go above the root, `up` ends up > 0
var up = 0;
for (var i = parts.length - 1; i >= 0; i--) {
@@ -30,7 +30,7 @@ mergeInto(LibraryManager.library, {
}
return parts;
},
- normalize: function (path) {
+ normalize: function(path) {
var isAbsolute = path.charAt(0) === '/',
trailingSlash = path.substr(-1) === '/';
// Normalize the path
@@ -45,7 +45,7 @@ mergeInto(LibraryManager.library, {
}
return (isAbsolute ? '/' : '') + path;
},
- dirname: function (path) {
+ dirname: function(path) {
var result = PATH.splitPath(path),
root = result[0],
dir = result[1];
@@ -59,7 +59,7 @@ mergeInto(LibraryManager.library, {
}
return root + dir;
},
- basename: function (path, ext) {
+ basename: function(path, ext) {
// EMSCRIPTEN return '/'' for '/', not an empty string
if (path === '/') return '/';
var f = PATH.splitPath(path)[2];
@@ -68,7 +68,7 @@ mergeInto(LibraryManager.library, {
}
return f;
},
- join: function () {
+ join: function() {
var paths = Array.prototype.slice.call(arguments, 0);
return PATH.normalize(paths.filter(function(p, index) {
if (typeof p !== 'string') {
@@ -77,7 +77,7 @@ mergeInto(LibraryManager.library, {
return p;
}).join('/'));
},
- resolve: function () {
+ resolve: function() {
var resolvedPath = '',
resolvedAbsolute = false;
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {