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.2-3 to 1.0.2-4

2

lib/CallResponder.d.ts
import { Callback } from './callback';
import { CustomCommands } from './CustomCommands';
export declare class CallResponder {
private queuedCalls;
private callQueue;
private readonly API_FUNCTION_NAME;

@@ -6,0 +6,0 @@ private readonly customCommands;

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

"use strict";var __read=this&&this.__read||function(o,e){var n="function"==typeof Symbol&&o[Symbol.iterator];if(!n)return o;var a,i,t=n.call(o),s=[];try{for(;(void 0===e||e-- >0)&&!(a=t.next()).done;)s.push(a.value)}catch(o){i={error:o}}finally{try{a&&!a.done&&(n=t.return)&&n.call(t)}finally{if(i)throw i.error}}return s},__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,n){for(var a,i=[],t=3;t<arguments.length;t++)i[t-3]=arguments[t];if("string"!=typeof o)n(null,!1);else if(SupportedVersions_1.SupportedVersions.has(e)){if("function"!=typeof n)throw new Error("invalid callback function");CmpApiModel_1.CmpApiModel.disabled?new DisabledCommand_1.DisabledCommand(n):this.isKnownCommand(o)?o===TCFCommands_1.TCFCommands.PING?new CommandMap_1.CommandMap[o](n,i[0]):this.customCommands&&this.customCommands[o]?(a=this.customCommands)[o].apply(a,__spread([n],i)):void 0===CmpApiModel_1.CmpApiModel.tcModel?this.queuedCalls.push([o,e,n,i]):new CommandMap_1.CommandMap[o](n,i[0]):n(null,!1)}else n(null,!1)},o.prototype.purgeQueuedCalls=function(){if(this.queuedCalls){var o=this.apiCall.bind(this);this.queuedCalls.forEach((function(e){o.apply(void 0,__spread(e))})),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.callQueue=window[this.API_FUNCTION_NAME]()}catch(o){this.callQueue=[]}finally{window[this.API_FUNCTION_NAME]=this.apiCall.bind(this)}this.purgeQueuedCalls()}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.callQueue.push(__spread([o,e,a],i)):new CommandMap_1.CommandMap[o](a,i[0]):a(null,!1)}else a(null,!1)},o.prototype.purgeQueuedCalls=function(){var o=this.apiCall.bind(this),e=this.callQueue;this.callQueue=[],e.forEach((function(e){o.apply(void 0,__spread(e))}))},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.2-3",
"version": "1.0.2-4",
"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.2-3",
"@iabtcf/testing": "1.0.2-3",
"@iabtcf/stub": "1.0.2-4",
"@iabtcf/testing": "1.0.2-4",
"@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