PageSourceSearch

https://www.dermalogica.co.uk/cdn/shop/t/333/assets/custom-gwp-gift-add.js?v=36304794284507555381789672941

js dermalogica.co.uk collected 2026-09-24 21:06:05 UTC 841 bytes, 2 lines download raw bytes

1export async function addGifts(items,signal){const gifts=Array.isArray(items)?items.filter(item=>item&&Number(item.id)>0):[];if(gifts.length===0)return{added:[],skipped:[]};if(await postItems(gifts,signal))return{added:gifts,skipped:[]};if(gifts.length===1)return{added:[],skipped:gifts};const added=[],skipped=[];for(const gift of gifts)await postItems([gift],signal)?added.push(gift):skipped.push(gift);return{added,skipped}}async function postItems(items,signal){try{return(await fetch(Theme.routes.cart_add_url,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items}),signal})).ok}catch(error){if(error instanceof DOMException&&error.name==="AbortError")throw error;return!1}}
2//# sourceMappingURL=/cdn/shop/t/333/assets/custom-gwp-gift-add.js.map?v=36304794284507555381789672941

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.