@pubtech-ai/stub

1.6.0 • Public • Published

NPM version npm module downloads per month InteractiveAdvertisingBureau

@pubtech-ai/stub

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

Installation

npm

npm install @pubtech-ai/stub

yarn

yarn add @pubtech-ai/stub

Using

include via module loading
import * as cmpstub from '@pubtech-ai/stub';

or

const cmpstub = require('@pubtech-ai/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/pubtech-ai-es.git

cd pubtech-ai-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], ...]

/@pubtech-ai/stub/

    Package Sidebar

    Install

    npm i @pubtech-ai/stub

    Homepage

    iabtcf.com/

    Weekly Downloads

    30

    Version

    1.6.0

    License

    Apache-2.0

    Unpacked Size

    4.09 kB

    Total Files

    5

    Last publish

    Collaborators

    • talksmprontera
    • l.coppola