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 =
JavaScript modules
To generate the string, use following syntax:
const privacyString =
will produce 1YYY
const privacyString =
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