MCPcopy Create free account
hub / github.com/GNOME/gjs / loadURI

Method loadURI

modules/internal/internalLoader.js:80–85  ·  view source on GitHub ↗

* Loads a file or resource URI synchronously * * @param {Uri} uri the file or resource URI to load * @returns {string} the contents of the module

(uri)

Source from the content-addressed store, hash-verified

78 * @returns {string} the contents of the module
79 */
80 loadURI(uri) {
81 if (uri.scheme === 'file' || uri.scheme === 'resource')
82 return loadResourceOrFile(uri.uri);
83
84 throw new ImportError(`Unsupported URI scheme for importing: ${uri.scheme ?? uri}`);
85 }
86
87 /**
88 * Resolves an import specifier given an optional parent importer.

Callers 2

resolveModuleMethod · 0.95
moduleLoadHookMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected