|
|
há 7 anos atrás | |
|---|---|---|
| .. | ||
| .travis.yml | há 7 anos atrás | |
| README.md | há 7 anos atrás | |
| index.js | há 7 anos atrás | |
| index.min.js | há 7 anos atrás | |
| package.json | há 7 anos atrás | |
| test.js | há 7 anos atrás | |
| test.min.js | há 7 anos atrás | |
Node.js
path.parse(pathString)ponyfill.Ponyfill: A polyfill that doesn't overwrite the native method
$ 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