Wondering what’s next for npm?Check out our public roadmap! »

    path-parse
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/path-parse package

    1.0.7 • Public • Published

    path-parse Build Status

    Node.js path.parse(pathString) ponyfill.

    Install

    $ npm install --save path-parse
    

    Usage

    var pathParse = require('path-parse');
    
    pathParse('/home/user/dir/file.txt');
    //=> {
    //       root : "/",
    //       dir : "/home/user/dir",
    //       base : "file.txt",
    //       ext : ".txt",
    //       name : "file"
    //   }

    API

    See path.parse(pathString) docs.

    pathParse(path)

    pathParse.posix(path)

    The Posix specific version.

    pathParse.win32(path)

    The Windows specific version.

    License

    MIT © Javier Blanco

    Install

    npm i path-parse

    DownloadsWeekly Downloads

    22,347,349

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    4.51 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar