Socket
Socket
Sign inDemoInstall

@iabtcf/stub

Package Overview
Dependencies
0
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iabtcf/stub

CMP API Stub code


Version published
Maintainers
2
Weekly downloads
2,894
decreased by-14.3%

Weekly downloads

Readme

Source

NPM version npm module downloads per month InteractiveAdvertisingBureau

@iabtcf/stub

Cmp API Stub code. Maybe included in commonjs loader or dropped directly on the page.

Installation

npm

npm install @iabtcf/stub

yarn

yarn add @iabtcf/stub
Using
include via module loading
import * as cmpstub from '@iabtcf/stub';

or

const cmpstub = require('@iabtcf/stub');

then execute:

cmpstub();

this should generate the __tcfapi() window function with the queing functionality.

to drop on a page
git clone https://github.com/InteractiveAdvertisingBureau/iabtcf-es.git

cd iabtcf-es/modules/stub/

yarn // or npm install

yarn build // or npm run build

Built stub will be output to ./lib

Getting queue of commands
const queue = __tcfapi();
console.log(queue); // [ ['command', 2, callback], ...]

Keywords

FAQs

Last updated on 04 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc