MCPcopy Index your code
hub / github.com/nodejs/node / defaultGetFormat

Function defaultGetFormat

lib/internal/modules/esm/get_format.js:257–263  ·  view source on GitHub ↗

* @param {URL} url * @param {{parentURL: string}} context * @returns {Promise | string | undefined} only works when enabled

(url, context)

Source from the content-addressed store, hash-verified

255 * @returns {Promise<string> | string | undefined} only works when enabled
256 */
257function defaultGetFormat(url, context) {
258 const protocol = url.protocol;
259 if (!ObjectPrototypeHasOwnProperty(protocolHandlers, protocol)) {
260 return null;
261 }
262 return protocolHandlers[protocol](url, context, false);
263}
264
265module.exports = {
266 defaultGetFormat,

Callers 4

defaultLoadFunction · 0.85
defaultLoadSyncFunction · 0.85
checkSyntaxFunction · 0.85
getFormatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…