Returns the depth of a file or directory, e.g. number of folders deep.
npm i depth --save-dev
npm test
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
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license