1.1.0 • Published 4 years ago

ccpa-string-builder v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

CCPA String Builder - JavaScript helper library

JavaScript library for building CCPA String. Compliant with the US Privacy String spec 1.0 written by IAB.

Installation

  • With NPM npm install ccpa-string-builder --save

  • With Yarn yarn add ccpa-string-builder

Usage

This library works with Node and Browser environments.

CommonJS

const CCPAStringBuilder = require('ccpa-string-builder')

JavaScript modules

import CCPAStringBuilder from 'ccpa-string-builder'

To generate the string, use following syntax:

const privacyString = CCPAStringBuilder({
  explicitOptOut: true,
  optOutSale: true,
  lspa: true,
})

will produce 1YYY

const privacyString = CCPAStringBuilder({})

will produce 1---

You may pass either undefined (Not Applicable) or boolean value for explicitOptOut, optOutSale, or lspa properties. Omitting parameter is the same as passing undefined.

Definitions of each component can be found here

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago