|  | 3 月之前 | |
|---|---|---|
| .. | ||
| LICENSE | 3 月之前 | |
| README.md | 3 月之前 | |
| index.js | 3 月之前 | |
| package.json | 3 月之前 | |
Node.js
path.parse(pathString)ponyfill.
$ npm install --save path-parse
var pathParse = require('path-parse');
pathParse('/home/user/dir/file.txt');
//=> {
//       root : "/",
//       dir : "/home/user/dir",
//       base : "file.txt",
//       ext : ".txt",
//       name : "file"
//   }
See path.parse(pathString) docs.
The Posix specific version.
The Windows specific version.
MIT © Javier Blanco