Socket
Socket
Sign inDemoInstall

is-subdir

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is-subdir

Return whether a directory is a subdirectory of another directory


Version published
Weekly downloads
907K
decreased by-7.35%
Maintainers
1
Install size
11.4 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 14 Apr 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc