# is-path-cwd

> Check if a path is the current working directory

Latest version **4.0.1** (published 2025-05-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-path-cwd
pnpm add is-path-cwd
yarn add is-path-cwd
bun add is-path-cwd
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2025-05-10 |
| First published | 2014-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | path, cwd, pwd, check, filepath, file, folder |

## Links

- npm: https://www.npmjs.com/package/is-path-cwd
- Repository: https://github.com/sindresorhus/is-path-cwd
- Homepage: https://github.com/sindresorhus/is-path-cwd#readme
- Issues: https://github.com/sindresorhus/is-path-cwd/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/is-path-cwd

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 4.0.1 (latest) — 2025-05-10
- 4.0.0 — 2025-05-10
- 3.0.0 — 2021-08-11
- 2.2.0 — 2019-07-05
- 2.1.0 — 2019-04-20
- 2.0.0 — 2018-03-22
- 1.0.0 — 2014-08-14
- 0.1.0 — 2014-06-19

## README

# is-path-cwd

> Check if a path is the [current working directory](https://en.wikipedia.org/wiki/Working_directory)

## Install

```sh
npm install is-path-cwd
```

## Usage

```js
import isPathCwd from 'is-path-cwd';

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

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

---
_Source: https://npm.io/package/is-path-cwd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
