wecui
Version:
一款基于Vue2.x版本的移动端web组件
13 lines (9 loc) • 343 B
JavaScript
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);
};
;