UNPKG

@typed/http

Version:

HTTP requests for node and browsers

5 lines 212 B
import { chain, tryCatch } from '@typed/either'; export function toJson(response) { return chain(({ responseText }) => tryCatch(() => JSON.parse(responseText)), response); } //# sourceMappingURL=toJson.js.map