Check if a path is the current working directory
$ npm install is-path-cwd
const isPathCwd = require('is-path-cwd'); isPathCwd(process.cwd()); //=> true isPathCwd('unicorn'); //=> false
MIT © Sindre Sorhus