Revision 20229d68
lib/path.js | ||
---|---|---|
206 | 206 |
exports.isAbsolute = function(path) { |
207 | 207 |
var result = splitDeviceRe.exec(path), |
208 | 208 |
device = result[1] || '', |
209 |
isUnc = device && device.charAt(1) !== ':'; |
|
209 |
isUnc = !!device && device.charAt(1) !== ':';
|
|
210 | 210 |
// UNC paths are always absolute |
211 | 211 |
return !!result[2] || isUnc; |
212 | 212 |
}; |
Also available in: Unified diff