UNPKG

@scalar/api-client

Version:

the open source API testing client

10 lines (9 loc) 306 B
import o from "whatwg-mimetype"; import { isTextMediaType as n } from "../../views/Request/consts/mediaTypes.js"; function m(r, t) { const e = new o(t); return n(e.essence) ? new TextDecoder(e.parameters.get("charset")).decode(r) : new Blob([r], { type: e.essence }); } export { m as decodeBuffer };