Portfolio/node_modules/is-relative/index.js
oitsjustjose 4e066bffc9 Init
2017-02-25 03:50:31 -05:00

11 lines
314 B
JavaScript

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