We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7f3775 commit 753d9cbCopy full SHA for 753d9cb
functions/index.js
@@ -55,10 +55,10 @@ const common_functions = {
55
* @returns
56
*/
57
isPathRelative(path) {
58
- if(typeof path !== 'string') return false
59
- let isAbsolute = /^([a-zA-Z]\:|\\\\[^\/\\:*?"<>|]+\\[^\/\\:*?"<>|]+)(\\[^\/\\:*?"<>|]+)+(\.[^\/\\:*?"<>|]+)$/.test(path);
+ if(typeof path !== 'string') return false;
+ let isAbsolute = /^([A-Za-z]:|\.)/.test(path);
60
61
- return !isAbsolute;
+ return isAbsolute;
62
},
63
64
/**
0 commit comments