UNPKG

292 BJavaScriptView Raw
1import process from 'node:process';
2import path from 'node:path';
3
4export default function isPathCwd(path_) {
5 let cwd = process.cwd();
6
7 path_ = path.resolve(path_);
8
9 if (process.platform === 'win32') {
10 cwd = cwd.toLowerCase();
11 path_ = path_.toLowerCase();
12 }
13
14 return path_ === cwd;
15}