Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iabtcf/cmpapi

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iabtcf/cmpapi - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1-0

6

package.json
{
"name": "@iabtcf/cmpapi",
"version": "1.3.0",
"version": "1.3.1-0",
"description": "Ensures other in-page digital marketing technologies have access to CMP transparency and consent information for the iab. Transparency and Consent Framework (TCF).",

@@ -26,4 +26,4 @@ "author": "Chris Paterson <tcf@chrispaterson.io>",

"devDependencies": {
"@iabtcf/stub": "1.3.0",
"@iabtcf/testing": "1.3.0",
"@iabtcf/stub": "1.3.1-0",
"@iabtcf/testing": "1.3.1-0",
"@istanbuljs/nyc-config-typescript": "^0.1.3",

@@ -30,0 +30,0 @@ "@types/mocha": "^5.2.7",

@@ -184,3 +184,3 @@ [![NPM version](https://img.shields.io/npm/v/@iabtcf/cmpapi.svg?style=flat-square)](https://www.npmjs.com/package/@iabtcf/cmpapi)

**Note:** `"addEventListener"` and `"removeEventListener"` can __not__ be overwritten. `"addEventListener"` utilizes the `"getTCData"` command, so to modify `TCData` responses, write a Built-In custom command for that command and both `"getTCData"` and `"addEventListener"` will utilize it.
**Note:** `"addEventListener"` and `"removeEventListener"` can __not__ be overwritten. `"addEventListener"` utilizes the `"getTCData"` command, so to modify `TCData` responses, write a Built-In custom command for that command and both `"getTCData"` and `"addEventListener"` will utilize it. If the `"removeEventListener"` command is also used with a custom `"getTCData"` command, note that `"removeEventListener"` will not return `tcData` but rather a boolean that indicates if the listener was removed. So it is important to add a check, otherwise the CmpApi will catch that error and the callbacks will return with `tcData: null`.

@@ -196,5 +196,11 @@ **Example**

// tcData will be constructed via the TC string and can be added to here
tcData.reallyImportantExtraProperty = true;
/*
* If using with 'removeEventListener' command, add a check to see if tcData is not a boolean. */
if (typeof tcData !== 'boolean') {
// tcData will be constructed via the TC string and can be added to here
tcData.reallyImportantExtraProperty = true;
}
// pass data and status along

@@ -201,0 +207,0 @@ next(tcData, status);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc