# is-path-in-cwd

> Check if a path is in the current working directory

Latest version **4.0.0** (published 2021-05-03) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 28/100 (F)** — status: abandoned.

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-05-03 |
| First published | 2014-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/is-path-in-cwd) |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | path, cwd, pwd, check, filepath, file, folder, in, inside |

## Links

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

## Dependencies (1)

- [is-path-inside](https://npm.io/package/is-path-inside.md) ^4.0.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-05-03
- 3.0.0 — 2019-07-05
- 2.1.0 — 2019-04-20
- 2.0.0 — 2018-03-22
- 1.0.1 — 2018-03-22
- 1.0.0 — 2014-08-14
- 0.1.1 — 2014-06-20
- 0.1.0 — 2014-06-19

## README

# is-path-in-cwd

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

## Install

```
$ npm install is-path-in-cwd
```

## Usage

```js
import isPathInCwd from 'is-path-in-cwd';

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

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

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

---

<div align="center">
	<b>
		<a href="https://tidelift.com/subscription/pkg/npm-is-path-in-cwd?utm_source=npm-is-path-in-cwd&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
	</b>
	<br>
	<sub>
		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
	</sub>
</div>

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