aswi2020vldc-gitlab/templetes/node_modules/urix/index.js @ 4605a44b
1 | 3a515b92 | cagy | // Copyright 2014 Simon Lydell
|
---|---|---|---|
2 | // X11 (“MIT”) Licensed. (See LICENSE.)
|
||
3 | |||
4 | var path = require("path") |
||
5 | |||
6 | "use strict" |
||
7 | |||
8 | function urix(aPath) { |
||
9 | if (path.sep === "\\") { |
||
10 | return aPath |
||
11 | .replace(/\\/g, "/") |
||
12 | .replace(/^[a-z]:\/?/i, "/") |
||
13 | }
|
||
14 | return aPath |
||
15 | }
|
||
16 | |||
17 | module.exports = urix |