path-depth

1.0.0 • Public • Published

path-depth

Get the depth of a file/URL path.

depth('/a/b/c')      //  3
depth('a\\..\\b\\c') //  2
depth('a/./b')       //  2
depth('foo/../..')   // -1
depth('.')           //  0

npm version build status ISC-licensed chat on gitter support me on Patreon

Installing

npm install path-depth

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.

/path-depth/

    Package Sidebar

    Install

    npm i path-depth

    Weekly Downloads

    627

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    2.69 kB

    Total Files

    4

    Last publish

    Collaborators

    • derhuerst