Open
Description
angularfire/site/src/shortcodes/includecode/fetch.js
Lines 17 to 31 in a26676c
to use latest node-fetch version you would need to use import instead of require
async function fetchCode(githubPath) {
const fetch = globalThis.fetch || import('node-fetch').then(mod => mod.default);
const githubApiUrl = convertToGitHubApiUrl(githubPath);
const response = await fetch(githubApiUrl);
return response.text();
}
Metadata
Metadata
Assignees
Labels
No labels