You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
812 B

4 years ago
  1. [![Build Status](https://travis-ci.org/lydell/urix.png?branch=master)](https://travis-ci.org/lydell/urix)
  2. Overview
  3. ========
  4. Makes Windows-style paths more unix and URI friendly. Useful if you work with
  5. paths that eventually will be used in URLs.
  6. ```js
  7. var urix = require("urix")
  8. // On Windows:
  9. urix("c:\\users\\you\\foo")
  10. // /users/you/foo
  11. // On unix-like systems:
  12. urix("c:\\users\\you\\foo")
  13. // c:\users\you\foo
  14. ```
  15. Installation
  16. ============
  17. `npm install urix`
  18. ```js
  19. var urix = require("urix")
  20. ```
  21. Usage
  22. =====
  23. ### `urix(path)` ###
  24. On Windows, replaces all backslashes with slashes and uses a slash instead of a
  25. drive letter and a colon for absolute paths.
  26. On unix-like systems it is a no-op.
  27. License
  28. =======
  29. [The X11 (“MIT”) License](LICENSE).