UNPKG

@scalar/api-client

Version:

the open source API testing client

20 lines (19 loc) 386 B
const n = (e) => { try { return decodeURIComponent(e); } catch { return e; } }; function r(e) { var t, m; let a = ""; if (e) { const c = ((t = e.match(/filename\*=UTF-8''([^;]+)/)) == null ? void 0 : t[1]) ?? ((m = e.match(/filename\s*=\s*"?([^";]+)"?/)) == null ? void 0 : m[1]); c && (a = n(c.trim())); } return a; } export { r as extractFilename };