* Returns whether a string represents a relative path (e.g. ./, ../) * * @param {string} path a path to check if relative * @returns {boolean}
(path)
| 36 | * @returns {boolean} |
| 37 | */ |
| 38 | function isRelativePath(path) { |
| 39 | // Check if the path is relative. Note that this doesn't mean "relative |
| 40 | // path" in the GLib sense, as in "not absolute" — it means a relative path |
| 41 | // module specifier, which must start with a '.' or '..' path component. |
| 42 | return path.startsWith('./') || path.startsWith('../'); |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Handles resolving and loading URIs. |