UNPKG

@beyonk/gdpr-cookie-consent-banner

Version:

GDPR Cookie Consent Banner for Svelte/Kit

15 lines (11 loc) 264 B
function validate (choice, cookieChoices) { const choices = Object.keys(choice) const chosen = Object.keys(cookieChoices) if (chosen.length !== choices.length) { return false } return chosen.every(c => choices.includes(c)) } export { validate }