README
Universal fetch API that only returns JSON.
Installation
yarn add cross-fetch-json
npm install cross-fetch-json
API
Types
import fetch, { JSONValue, JSONObject, JSONArray } from "cross-fetch-json";
function fetch<T extends JSONValue>(info: RequestInfo, init?: RequestInit): Promise<T | undefined>;
type JSONValue = string | number | boolean | JSONObject | JSONArray
Dependencies
- cross-fetch: Universal WHATWG Fetch API for Node, Browsers and React Native.
- parse-json-object: Parse a typed JSON object.
Dev Dependencies
- @bconnorwhite/bob: Bob is a toolkit for TypeScript projects
- jest: Delightful JavaScript Testing.
License 
Related Packages:
- parse-json-object: Parse a typed JSON object.
- types-json: Type checking for JSON objects