1.0.0 • Published 1 month ago
@npmteanew/mollitia-dignissimos-mollitia-deserunt v1.0.0
@npmteanew/mollitia-dignissimos-mollitia-deserunt
A protocol handler wrapper for fetch.
Usage
@npmteanew/mollitia-dignissimos-mollitia-deserunt
doesn't contain any fetch implementations.
A map of protocol to implementation must be given to the constructor.
This example shows how to create a fetch for file, http and https URLs:
import fileFetch from 'file-fetch'
import httpFetch from 'nodeify-fetch'
import protoFetch from '@npmteanew/mollitia-dignissimos-mollitia-deserunt'
const fetch = protoFetch({
[null]: fileFetch,
file: fileFetch,
http: httpFetch,
https: httpFetch
})
const res = await fetch(`file://${process.cwd()}/package.json`)
1.0.0
1 month ago