0.1.1 • Published 10 years ago

depth v0.1.1

Weekly downloads
5
License
-
Repository
github
Last release
10 years ago

depth

Returns the depth of a file or directory, e.g. number of folders deep.

Install

Install with npm:

npm i depth --save-dev

Run tests

npm test

Usage

var depth = require('depth');

console.log(depth('index.js'));
//=> 0
console.log(depth('./node_modules/'));
//=> 1
console.log(depth('./node_modules/verb'));
//=> 2
console.log(depth('./node_modules/verb/index.js'));
//=> 2

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license