aboutsummaryrefslogtreecommitdiff
path: root/node_modules/urix/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/urix/index.js')
-rw-r--r--node_modules/urix/index.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/urix/index.js b/node_modules/urix/index.js
new file mode 100644
index 0000000..dc6ef27
--- /dev/null
+++ b/node_modules/urix/index.js
@@ -0,0 +1,17 @@
+// Copyright 2014 Simon Lydell
+// X11 (“MIT”) Licensed. (See LICENSE.)
+
+var path = require("path")
+
+"use strict"
+
+function urix(aPath) {
+ if (path.sep === "\\") {
+ return aPath
+ .replace(/\\/g, "/")
+ .replace(/^[a-z]:\/?/i, "/")
+ }
+ return aPath
+}
+
+module.exports = urix