diff options
Diffstat (limited to 'node_modules/is-relative/index.js')
-rw-r--r-- | node_modules/is-relative/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/node_modules/is-relative/index.js b/node_modules/is-relative/index.js index 4272ca8ae..37563577f 100644 --- a/node_modules/is-relative/index.js +++ b/node_modules/is-relative/index.js @@ -2,10 +2,11 @@ var isUncPath = require('is-unc-path'); -module.exports = function isRelative(fp) { - if (typeof fp !== 'string') { - throw new TypeError('isRelative expects a string.'); +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(fp) && !/^([a-z]:)?[\\\/]/i.test(fp); + return !isUncPath(filepath) && !/^([a-z]:)?[\\\/]/i.test(filepath); }; |