is-path-cwd
Advanced tools
Comparing version 2.1.0 to 2.2.0
13
index.js
'use strict'; | ||
const path = require('path'); | ||
module.exports = path_ => path.resolve(path_) === process.cwd(); | ||
module.exports = path_ => { | ||
let cwd = process.cwd(); | ||
path_ = path.resolve(path_); | ||
if (process.platform === 'win32') { | ||
cwd = cwd.toLowerCase(); | ||
path_ = path_.toLowerCase(); | ||
} | ||
return path_ === cwd; | ||
}; |
{ | ||
"name": "is-path-cwd", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Check if a path is the current working directory", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
2760
24