How to use the unfetch.default function in unfetch

To help you get started, we’ve selected a few unfetch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shakyShane / json-ts / docs / src / index.js View on Github external
examplesElem.addEventListener('change', function () {
    if (examplesElem.value !== 'Select an example') {
        examplesElem.parentNode.classList.add('loading');
        const resp = fetch(examplesElem.value).then(x => x.text());
        resp.then(x => jsonInput.setValue(x));
    }
});

unfetch

Bare minimum fetch polyfill in 500 bytes

MIT
Latest version published 1 year ago

Package Health Score

73 / 100
Full package analysis