UNIX absolute path starts with '/', whereas Windows starts with alphabet 'C:' or '\'. Does node.js has a standard multiplatform function to check if a path is absolute or relative ?
Since node version 0.12.0 you can use the path.isAbsolute(path)
function from the path module.
i.e:
var path = require('path');
if(path.isAbsolute(myPath)) {
//...
}