Check if a path is in the current working directory
$ npm install is-path-in-cwd
const isPathInCwd = require('is-path-in-cwd'); isPathInCwd('unicorn'); //=> true isPathInCwd('../rainbow'); //=> false isPathInCwd('.'); //=> false
MIT © Sindre Sorhus
Last updated 2 years ago