@plos/cookie-consent
v1.0.5
Published
API for interaction w/ consent tracking cookie
Downloads
24
Readme
Cookie Consent
Cookie library for ensuring consistency across PLOS applications.
Usage
accept
No parameters. Accepts all cookies.
customize
customize(purpose:string, accept:boolean)
Set consent status for specific purpose. purpose
must be valid.
hasConsented
hasConsented(purpose)
Returns whether the user has consented to cookies for the given purpose.
If purpose
is not provided, then returns when the user has consented
to cookies for any of the valid purposes.
reject
No parameters. Rejects all cookies.
reset
Deletes the consent cookie.