UNPKG

@scalar/api-client

Version:

the open source API testing client

13 lines (12 loc) 250 B
import n from "pretty-bytes"; const o = (e) => { const t = Number.parseInt( e.headers?.["Content-Length"] || e.headers?.["content-length"] || "0", 10 ); if (!(isNaN(t) || t <= 0)) return n(t); }; export { o as getContentLength };