@webpro/is-subdir
Check if a directory is a subdirectory
Last updated 7 years ago by webpro .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (7 years ago)

1 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |