@ckies/library

Library to check for Cookie Settings

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
01Jun 17, 2018Apr 30, 2018Minified + gzip package size for @ckies/library in KB

Readme

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>

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.