UNPKG
@beyonk/gdpr-cookie-consent-banner
Version:
latest (16.0.2)
16.0.2
16.0.1
16.0.0
15.0.5
15.0.4
15.0.3
15.0.2
15.0.1
15.0.0
14.0.1
14.0.0
13.0.1
12.1.6
12.1.4
12.1.3
12.1.0
12.0.2
11.0.0
11.0.0-6
11.0.0-5
11.0.0-4
11.0.0-3
11.0.0-2
11.0.0-1
11.0.0-0
10.2.1
10.1.1
10.0.0
9.1.1
9.1.0
9.0.4
9.0.3
9.0.2
9.0.1
9.0.0
8.0.1
8.0.0
7.1.2
7.1.1
7.1.0
7.0.1
7.0.0
6.4.1
6.4.0
6.3.0
6.2.1
6.2.0
6.1.1
6.1.0
6.0.2
5.0.2
5.0.1
5.0.0
4.0.0
3.5.3
3.5.2
3.5.1
3.5.0
3.4.0
3.3.1
3.3.0
3.2.0
3.1.1
3.1.0
3.0.0
2.1.0
2.0.2
2.0.1
1.0.0
GDPR Cookie Consent Banner for Svelte/Kit
@beyonk/gdpr-cookie-consent-banner
/
src
/
lib
/
util.js
15 lines
(11 loc)
•
264 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 }