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

@iabtcf/cmpapi

Package Overview
Dependencies
Maintainers
1
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.0.1-2 to 1.0.1-3

2

lib/callback/ErrorCallback.d.ts

@@ -1,1 +0,1 @@

export declare type ErrorCallback = (msg: string, success: false) => void;
export declare type ErrorCallback = (res: null, success: false) => void;

@@ -1,1 +0,1 @@

"use strict";var __read=this&&this.__read||function(o,e){var a="function"==typeof Symbol&&o[Symbol.iterator];if(!a)return o;var n,i,t=a.call(o),d=[];try{for(;(void 0===e||e-- >0)&&!(n=t.next()).done;)d.push(n.value)}catch(o){i={error:o}}finally{try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(i)throw i.error}}return d},__spread=this&&this.__spread||function(){for(var o=[],e=0;e<arguments.length;e++)o=o.concat(__read(arguments[e]));return o};Object.defineProperty(exports,"__esModule",{value:!0});var CommandMap_1=require("./command/CommandMap"),CmpApiModel_1=require("./CmpApiModel"),TCFCommands_1=require("./command/TCFCommands"),DisabledCommand_1=require("./command/DisabledCommand"),SupportedVersions_1=require("./SupportedVersions"),CallResponder=function(){function o(o){this.API_FUNCTION_NAME="__tcfapi",this.customCommands=o;try{this.queuedCalls=window[this.API_FUNCTION_NAME]()}catch(o){}finally{window[this.API_FUNCTION_NAME]=this.apiCall.bind(this)}}return o.prototype.apiCall=function(o,e,a){for(var n,i=[],t=3;t<arguments.length;t++)i[t-3]=arguments[t];if("string"!=typeof o)a("invalid command: "+o,!1);else if(SupportedVersions_1.SupportedVersions.has(e)){if("function"!=typeof a)throw new Error("invalid callback function");CmpApiModel_1.CmpApiModel.disabled?new DisabledCommand_1.DisabledCommand(a):this.isKnownCommand(o)?o===TCFCommands_1.TCFCommands.PING?new CommandMap_1.CommandMap[o](a,i[0]):this.customCommands&&this.customCommands[o]?(n=this.customCommands)[o].apply(n,__spread([a],i)):void 0===CmpApiModel_1.CmpApiModel.tcModel?this.queuedCalls.push([o,e,a,i]):new CommandMap_1.CommandMap[o](a,i[0]):a('CmpApi does not support the "'+o+'" command',!1)}else a("unsupported version: "+e,!1)},o.prototype.purgeQueuedCalls=function(){if(this.queuedCalls){var o=this.apiCall.bind(this);this.queuedCalls.forEach((function(e){var a=__read(e,4),n=a[0],i=a[1],t=a[2],d=a[3];void 0!==d?o.apply(void 0,__spread([n,i,t],d)):o(n,i,t)})),delete this.queuedCalls}},o.prototype.isKnownCommand=function(o){return void 0!==this.customCommands&&void 0!==this.customCommands[o]||void 0!==CommandMap_1.CommandMap[o]},o}();exports.CallResponder=CallResponder;
"use strict";var __read=this&&this.__read||function(o,e){var a="function"==typeof Symbol&&o[Symbol.iterator];if(!a)return o;var n,i,t=a.call(o),r=[];try{for(;(void 0===e||e-- >0)&&!(n=t.next()).done;)r.push(n.value)}catch(o){i={error:o}}finally{try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(i)throw i.error}}return r},__spread=this&&this.__spread||function(){for(var o=[],e=0;e<arguments.length;e++)o=o.concat(__read(arguments[e]));return o};Object.defineProperty(exports,"__esModule",{value:!0});var CommandMap_1=require("./command/CommandMap"),CmpApiModel_1=require("./CmpApiModel"),TCFCommands_1=require("./command/TCFCommands"),DisabledCommand_1=require("./command/DisabledCommand"),SupportedVersions_1=require("./SupportedVersions"),CallResponder=function(){function o(o){this.API_FUNCTION_NAME="__tcfapi",this.customCommands=o;try{this.queuedCalls=window[this.API_FUNCTION_NAME]()}catch(o){}finally{window[this.API_FUNCTION_NAME]=this.apiCall.bind(this)}}return o.prototype.apiCall=function(o,e,a){for(var n,i=[],t=3;t<arguments.length;t++)i[t-3]=arguments[t];if("string"!=typeof o)a(null,!1);else if(SupportedVersions_1.SupportedVersions.has(e)){if("function"!=typeof a)throw new Error("invalid callback function");CmpApiModel_1.CmpApiModel.disabled?new DisabledCommand_1.DisabledCommand(a):this.isKnownCommand(o)?o===TCFCommands_1.TCFCommands.PING?new CommandMap_1.CommandMap[o](a,i[0]):this.customCommands&&this.customCommands[o]?(n=this.customCommands)[o].apply(n,__spread([a],i)):void 0===CmpApiModel_1.CmpApiModel.tcModel?this.queuedCalls.push([o,e,a,i]):new CommandMap_1.CommandMap[o](a,i[0]):a(null,!1)}else a(null,!1)},o.prototype.purgeQueuedCalls=function(){if(this.queuedCalls){var o=this.apiCall.bind(this);this.queuedCalls.forEach((function(e){var a=__read(e,4),n=a[0],i=a[1],t=a[2],r=a[3];void 0!==r?o.apply(void 0,__spread([n,i,t],r)):o(n,i,t)})),delete this.queuedCalls}},o.prototype.isKnownCommand=function(o){return void 0!==this.customCommands&&void 0!==this.customCommands[o]||void 0!==CommandMap_1.CommandMap[o]},o}();exports.CallResponder=CallResponder;
{
"name": "@iabtcf/cmpapi",
"version": "1.0.1-2",
"version": "1.0.1-3",
"description": "Ensures other in-page digital marketing technologies have access to CMP transparency and consent information for the iab. Transparency and Consent Framework (TCF).",

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

"devDependencies": {
"@iabtcf/stub": "1.0.1-2",
"@iabtcf/testing": "1.0.1-2",
"@iabtcf/stub": "1.0.1-3",
"@iabtcf/testing": "1.0.1-3",
"@istanbuljs/nyc-config-typescript": "^0.1.3",

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

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