Skip to content

Commit

Permalink
joinPath
Browse files Browse the repository at this point in the history
  • Loading branch information
manny committed Nov 21, 2014
1 parent 5a341b8 commit 1503d31
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var path = require('path');
module.exports = function(args1, args2/*, ... argsN*/) {
var fullPath = path.apply(null, arguments);
if (process.platform === 'win32') {
fullPath = fullPath.replace(/\\/g, '/');
}
return fullPath;
}
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "joinPath",
"version": "1.0.0",
"description": "Function to join paths that always returns forward slashes (uniform for unix and windows). A replacement to path.join",
"keywords": [
"joinPath",
"path.join",
"alternative",
"uniform",
"forward slash"
],
"author": {
"name": "Manny Vergel",
"email": "[email protected]",
"url": "http://www.mvergel.com/"
},
"homepage": "https://github.com/mannyvergel/joinPath-js",
"repository": {
"type": "git",
"url": "https://github.com/mannyvergel/joinPath-js.git"
},

"engines": {
"node": ">= 0.10.0",
"npm": ">= 1.0.0"
},

"dependencies": {
},
"devDependencies": {},
"bundleDependencies": [],

"private": false,
"main": "index.js"
}

0 comments on commit 1503d31

Please sign in to comment.