Skip to content
Check if a path is in the current working directory
JavaScript TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig Require Node.js 6 Mar 22, 2018
.gitattributes Add TypeScript definition (#4) Apr 20, 2019
.gitignore Require Node.js 6 Mar 22, 2018
.npmrc Require Node.js 6 Mar 22, 2018
.travis.yml Require Node.js 8 Jul 5, 2019
index.d.ts
index.js Add TypeScript definition (#4) Apr 20, 2019
index.test-d.ts Add TypeScript definition (#4) Apr 20, 2019
license Require Node.js 6 Mar 22, 2018
package.json 3.0.0 Jul 5, 2019
readme.md Require Node.js 8 Jul 5, 2019
test.js Add TypeScript definition (#4) Apr 20, 2019

readme.md

is-path-in-cwd Build Status

Check if a path is in the current working directory

Install

$ npm install is-path-in-cwd

Usage

const isPathInCwd = require('is-path-in-cwd');

isPathInCwd('unicorn');
//=> true

isPathInCwd('../rainbow');
//=> false

isPathInCwd('.');
//=> false
You can’t perform that action at this time.