Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
548 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | # is-path-in-cwd [![Build Status](https://travis-ci.org/sindresorhus/is-path-in-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/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 |
|
---|
| 6 | ## Install
|
---|
| 7 |
|
---|
| 8 | ```
|
---|
| 9 | $ npm install is-path-in-cwd
|
---|
| 10 | ```
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | ## Usage
|
---|
| 14 |
|
---|
| 15 | ```js
|
---|
| 16 | const isPathInCwd = require('is-path-in-cwd');
|
---|
| 17 |
|
---|
| 18 | isPathInCwd('unicorn');
|
---|
| 19 | //=> true
|
---|
| 20 |
|
---|
| 21 | isPathInCwd('../rainbow');
|
---|
| 22 | //=> false
|
---|
| 23 |
|
---|
| 24 | isPathInCwd('.');
|
---|
| 25 | //=> false
|
---|
| 26 | ```
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | ## License
|
---|
| 30 |
|
---|
| 31 | MIT © [Sindre Sorhus](https://sindresorhus.com)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.