Check if a path is CWD
$ npm install --save is-path-cwd
var isPathCwd = require('is-path-cwd'); isPathCwd(process.cwd()); //=> true isPathCwd('unicorn'); //=> false
MIT © Sindre Sorhus