wallet-core/node_modules/is-relative/index.js
2016-10-10 03:43:44 +02:00

12 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);
};