1 | # is-path-in-cwd
|
2 |
|
3 | > Check if a path is in the [current working directory](https://en.wikipedia.org/wiki/Working_directory)
|
4 |
|
5 | ## Install
|
6 |
|
7 | ```
|
8 | $ npm install is-path-in-cwd
|
9 | ```
|
10 |
|
11 | ## Usage
|
12 |
|
13 | ```js
|
14 | import isPathInCwd from 'is-path-in-cwd';
|
15 |
|
16 | isPathInCwd('unicorn');
|
17 | //=> true
|
18 |
|
19 | isPathInCwd('../rainbow');
|
20 | //=> false
|
21 |
|
22 | isPathInCwd('.');
|
23 | //=> false
|
24 | ```
|
25 |
|
26 | ---
|
27 |
|
28 | <div align="center">
|
29 | <b>
|
30 | <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>
|
31 | </b>
|
32 | <br>
|
33 | <sub>
|
34 | Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
35 | </sub>
|
36 | </div>
|