Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

zkochan/is-subdir

Repository files navigation

moved to https://github.com/zkochan/packages/tree/master/is-subdir

is-subdir

Return whether a directory is a subdirectory of another directory

npm version Build Status Build Status on Windows

Cross-platform. Works correctly on Windows, where directory paths can start with disk drive letters in different casings. Like c:\foo and C:\foo\bar.

Installation

npm i -S is-subdir

Usage

'use strict'
const path = require('path')
const isSubdir = require('is-subdir')

console.log(isSubdir(process.cwd(), path.resolve('node_modules')))
//> true

License

MIT © Zoltan Kochan

About

Return if a directory is a subdirectory of another directory

Resources

License

Stars

Watchers

Forks

Packages

No packages published