@diahkomalasarinpm/iste-animi-deleniti
v1.0.0
Published
[![build status](https://img.shields.io/github/actions/workflow/status/bergos/@diahkomalasarinpm/iste-animi-deleniti/test.yaml?branch=master)](https://github.com/diahkomalasarinpm/iste-animi-deleniti/actions/workflows/test.yaml) [![npm version](https://im
Downloads
2
Maintainers
Keywords
Readme
@diahkomalasarinpm/iste-animi-deleniti
A protocol handler wrapper for fetch.
Usage
@diahkomalasarinpm/iste-animi-deleniti
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 '@diahkomalasarinpm/iste-animi-deleniti'
const fetch = protoFetch({
[null]: fileFetch,
file: fileFetch,
http: httpFetch,
https: httpFetch
})
const res = await fetch(`file://${process.cwd()}/package.json`)