Subtheme of barrio
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

12 lines
343 B

'use strict';
var isUncPath = require('is-unc-path');
module.exports = function isRelative(filepath) {
if (typeof filepath !== 'string') {
throw new TypeError('expected filepath to be a string');
}
// Windows UNC paths are always considered to be absolute.
return !isUncPath(filepath) && !/^([a-z]:)?[\\\/]/i.test(filepath);
};