e5dcf2010e8858ec025da5ff623502d9790a9c8bd8d86c0e56b9ba9d67d54cad1d9ca8fb5525becfa3a0ca3a71302f864faa91331876b1c23140dfd64b46fa 871 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse)
  2. > Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com).
  3. ## Install
  4. ```
  5. $ npm install --save path-parse
  6. ```
  7. ## Usage
  8. ```js
  9. var pathParse = require('path-parse');
  10. pathParse('/home/user/dir/file.txt');
  11. //=> {
  12. // root : "/",
  13. // dir : "/home/user/dir",
  14. // base : "file.txt",
  15. // ext : ".txt",
  16. // name : "file"
  17. // }
  18. ```
  19. ## API
  20. See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs.
  21. ### pathParse(path)
  22. ### pathParse.posix(path)
  23. The Posix specific version.
  24. ### pathParse.win32(path)
  25. The Windows specific version.
  26. ## License
  27. MIT © [Javier Blanco](http://jbgutierrez.info)