$ npm install @webpro/is-subdir
npm install @webpro/is-subdir
const isSubDir = require('@webpro/is-subdir');
isSubDir(dir = '.', base = process.cwd()) => Boolean
isSubDir('..'); // false
isSubDir('.'); // false
isSubDir('foo'); // true
isSubDir('/foo/bar', '/foo'); // true
See the tests for more examples.
© 2010 - cnpmjs.org x YWFE | Home | YWFE