varcurrentPlatform=process!==void0?process.platform:'';functionisAbsolute(path){if(currentPlatform==='win32'){// Regex to split a windows path into three parts: [*, device, slash,// tail] windows-onlyvarsplitDeviceRe=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;varresult=splitDeviceRe.exec(path),device=result[1]||'',isUnc=device&&device.charAt(1)!==':';// UNC paths are always absolutereturn!!result[2]||isUnc;}else{returnpath.charAt(0)==='/';}}module.exports=isAbsolute;isAbsolute.setPlatform=function(platform){currentPlatform=platform;};