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)) {
//...
}
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)) {
//...
}