JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 193
  • Score
    100M100P100Q88515F
  • License Apache-2.0

Simple JavaScript parser for transparency and consent strings compatible with TCF 2.0.

Package Exports

  • tc-string-parse

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tc-string-parse) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TCStringParse

Simple JavaScript parser for transparency and consent strings compatible with TCF 2.0.

Installation

Parser is available as NPM package:

npm install tc-string-parse

Usage

NodeJS (>=5.10.0)

const tcStringParse = require('tc-string-parse');

const consentString = ''; // your consent string
const consentModel = tcStringParse(consentString);

Browser (IE 9+ with atob polyfill)

<script src="path/to/tc-string-parse.min.js"></script>

<script>
  var consentString = ''; // your consent string
  var consentModel = TCStringParse(consentString);
</script>

Command line

tc-string-parse <your consent string>