* Checks if a path is relative * @param {string} path the target path * @returns {boolean} true if the path is relative, false otherwise
(path)
| 2176 | * @returns {boolean} true if the path is relative, false otherwise |
| 2177 | */ |
| 2178 | function isRelative(path) { |
| 2179 | if (StringPrototypeCharCodeAt(path, 0) !== CHAR_DOT) { return false; } |
| 2180 | |
| 2181 | return path.length === 1 || path === '..' || |
| 2182 | StringPrototypeStartsWith(path, './') || |
| 2183 | StringPrototypeStartsWith(path, '../') || |
| 2184 | ((isWindows && StringPrototypeStartsWith(path, '.\\')) || |
| 2185 | StringPrototypeStartsWith(path, '..\\')); |
| 2186 | } |
| 2187 | |
| 2188 | Module.createRequire = createRequire; |
| 2189 |
no outgoing calls
no test coverage detected
searching dependent graphs…