Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 609 Bytes

README.md

File metadata and controls

32 lines (26 loc) · 609 Bytes

is-file-in-cwd

Check if a filename is in the current working directory.

Install

$ yarn add is-file-in-cwd # Or alternatively: `npm install --save is-file-in-cwd`

Usage

'use strict';

const isFileInCwd = require('is-file-in-cwd');

// Returns `true` if a file named `README.md` is located in the
// directory that `process.cwd()` is pointing to. Returns `false`
// otherwise.
isFileInCwd('README.md');

Testing

$ yarn test # Or alternatively: `npm test`

License

The MIT License (Expat). See the license file for details.