1.0.0 • Published 5 years ago

path-depth v1.0.0

Weekly downloads
534
License
ISC
Repository
github
Last release
5 years ago

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.