UNPKG

@scalar/api-client

Version:

the open source API testing client

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