You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
548 B

4 years ago
  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. > Check if a path is in the [current working directory](https://en.wikipedia.org/wiki/Working_directory)
  3. ## Install
  4. ```
  5. $ npm install is-path-in-cwd
  6. ```
  7. ## Usage
  8. ```js
  9. const isPathInCwd = require('is-path-in-cwd');
  10. isPathInCwd('unicorn');
  11. //=> true
  12. isPathInCwd('../rainbow');
  13. //=> false
  14. isPathInCwd('.');
  15. //=> false
  16. ```
  17. ## License
  18. MIT © [Sindre Sorhus](https://sindresorhus.com)