How to use the @iabtcf/core.TCString.decode function in @iabtcf/core

To help you get started, we’ve selected a few @iabtcf/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github InteractiveAdvertisingBureau / iabtcf-es / modules / cli / src / index.ts View on Github external
break;
    case 'number':
      console.log(`${indentString}${key}: ${value}\x1b[0m`);
      break;

  }

};

if (encoded) {

  print('encoded', encoded);

  try {

    const tcModel = TCString.decode(encoded);
    print('version', tcModel.version);
    print('cmpId', tcModel.cmpId);
    print('cmpVersion', tcModel.cmpVersion);
    print('consentScreen', tcModel.consentScreen);
    print('consentLanguage', tcModel.consentLanguage);
    print('created', tcModel.created);
    print('lastUpdated', tcModel.lastUpdated);
    print('policyVersion', tcModel.policyVersion);
    print('isServiceSpecific', tcModel.isServiceSpecific);
    print('useNonStandardStacks', tcModel.useNonStandardStacks);
    print('purposeOneTreatment', tcModel.purposeOneTreatment);
    print('publisherCountryCode', tcModel.publisherCountryCode);
    print('supportOOB', tcModel.supportOOB);
    print('vendorListVersion', tcModel.vendorListVersion);
    print('purposeConsents', tcModel.purposeConsents);
    print('purposeLegitimateInterest', tcModel.purposeLegitimateInterest);

@iabtcf/core

Ensures consistent encoding and decoding of TC Signals for the iab. Transparency and Consent Framework (TCF).

Apache-2.0
Latest version published 1 year ago

Package Health Score

73 / 100
Full package analysis