@ckies/library
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Library

Approach to offer a generic tooling for GDPR-compliant cookie handling. Use @ckies/library in your JavaScript or TypeScript projects, or use it as a drop-in solution for static projects.

Mode

The opt-out mode is enabled per default. If you set window.CKIES_OPTIN to true, all cookies but necessary ones are denied per default.

Usage

Custom Build Process

import { ckies } from '@ckies/library'

if (ckies.useMarketing()) {
  console.log('Marketing cookies are allowed!')
}

Hosted Library

<script src="ckies.min.js"></script>

<script>
  if (ckies.useMarketing()) {
    console.log('Marketing cookies are allowed!')
  }
</script>

Package Sidebar

Install

npm i @ckies/library

Weekly Downloads

346

Version

0.2.0

License

MIT

Unpacked Size

232 kB

Total Files

18

Last publish

Collaborators

  • sbstjn