sindresorhus/is-path-cwd

Check if a path is the current working directory

JavaScript

22

25 commits

updated Sep 18, 2026

See the code

README

is-path-cwd

Check if a path is the current working directory

Install

npm install is-path-cwd

Usage

import isPathCwd from 'is-path-cwd';

isPathCwd(process.cwd());
//=> true

isPathCwd('unicorn');
//=> false