Last change
on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
766 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | [![Build Status](https://travis-ci.org/lydell/urix.png?branch=master)](https://travis-ci.org/lydell/urix)
|
---|
| 2 |
|
---|
| 3 | Overview
|
---|
| 4 | ========
|
---|
| 5 |
|
---|
| 6 | Makes Windows-style paths more unix and URI friendly. Useful if you work with
|
---|
| 7 | paths that eventually will be used in URLs.
|
---|
| 8 |
|
---|
| 9 | ```js
|
---|
| 10 | var urix = require("urix")
|
---|
| 11 |
|
---|
| 12 | // On Windows:
|
---|
| 13 | urix("c:\\users\\you\\foo")
|
---|
| 14 | // /users/you/foo
|
---|
| 15 |
|
---|
| 16 | // On unix-like systems:
|
---|
| 17 | urix("c:\\users\\you\\foo")
|
---|
| 18 | // c:\users\you\foo
|
---|
| 19 | ```
|
---|
| 20 |
|
---|
| 21 |
|
---|
| 22 | Installation
|
---|
| 23 | ============
|
---|
| 24 |
|
---|
| 25 | `npm install urix`
|
---|
| 26 |
|
---|
| 27 | ```js
|
---|
| 28 | var urix = require("urix")
|
---|
| 29 | ```
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | Usage
|
---|
| 33 | =====
|
---|
| 34 |
|
---|
| 35 | ### `urix(path)` ###
|
---|
| 36 |
|
---|
| 37 | On Windows, replaces all backslashes with slashes and uses a slash instead of a
|
---|
| 38 | drive letter and a colon for absolute paths.
|
---|
| 39 |
|
---|
| 40 | On unix-like systems it is a no-op.
|
---|
| 41 |
|
---|
| 42 |
|
---|
| 43 | License
|
---|
| 44 | =======
|
---|
| 45 |
|
---|
| 46 | [The X11 (“MIT”) License](LICENSE).
|
---|
Note:
See
TracBrowser
for help on using the repository browser.