is-path-in-cwd
Version:
Check if a path is in the current working directory
19 lines (14 loc) • 335 B
TypeScript
/**
Check if a path is in the [current working directory](https://en.wikipedia.org/wiki/Working_directory).
@example
```
import isPathInCwd from 'is-path-in-cwd';
isPathInCwd('unicorn');
//=> true
isPathInCwd('../rainbow');
//=> false
isPathInCwd('.');
//=> false
```
*/
export default function isPathInCwd(path: string): boolean;