Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
2 lines
572 B
Plaintext
2 lines
572 B
Plaintext
const e=require(`./is-response.cjs`);async function t(t){if(!(typeof t!=`object`||!t)){if(e.isFetchResponse(t)){let e=t.headers.get(`Content-Type`)?.toLowerCase();if(e?.startsWith(`application/json`)||e?.startsWith(`application/health+json`)){let e=await t.json();if(!t.ok||`errors`in e)throw e;return`data`in e?e.data:e}if(e?.startsWith(`text/html`)||e?.startsWith(`text/plain`)){let e=await t.text();if(!t.ok)throw e;return e}return t.status===204?null:t}if(`errors`in t)throw t;return`data`in t?t.data:t}}exports.extractData=t;
|
|
//# sourceMappingURL=extract-data.cjs.map |