@webpro/is-subdir
Check if a directory is a subdirectory
Last updated 6 years ago by webpro .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @webpro/is-subdir 
SYNC missed versions from official npm registry.

is-subdir

Installation

npm install @webpro/is-subdir

Usage

const isSubDir = require('@webpro/is-subdir');
isSubDir(dir = '.', base = process.cwd()) => Boolean

Examples

isSubDir('..'); // false
isSubDir('.'); // false
isSubDir('foo'); // true
isSubDir('/foo/bar', '/foo'); // true

See the tests for more examples.

Alternatives

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

1 Versions

  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE