path2/windows/is-absolute.js
raw| 1 | 'use strict'; |
| 2 | |
| 3 | var splitDeviceRe = require('./_split-device-re'); |
| 4 | |
| 5 | module.exports = function (path) { |
| 6 | var result = splitDeviceRe.exec(path), device = result[1] || '' |
| 7 | , isUnc = device && device.charAt(1) !== ':'; |
| 8 | |
| 9 | // UNC paths are always absolute |
| 10 | return !!result[2] || isUnc || false; |
| 11 | }; |