@testing-org-32/testing
TypeScript icon, indicating that this package has built-in type declarations

1.5.14 • Public • Published

NPM version npm module downloads per month InteractiveAdvertisingBureau

@iabtechlabtcf/testing

Testing tools to generate randomized input/output

Installation

npm

npm install @iabtechlabtcf/testing --save-dev

yarn

yarn add -D @iabtechlabtcf/testing

Utilities

TCModelFactory

Generate random TCModel with GVL

import {TCModelFactory} from '@iabtechlabtcf/testing';

const tcModel = TCModelFactory.withGVL();

Generate random TC string

import {TCString} from '@iabtechlabtcf/core';
import {TCModelFactory} from '@iabtechlabtcf/testing';

console.log(TCString.encode(TCModelFactory.noGVL()));
// ... random tc string

Add publisher restrictions

import {TCModelFactory} from '@iabtechlabtcf/testing';
let tcModel = TCModelFactory.withGVL();
tcModel = TCModelFactory.addPublisherRestrictions(tcModel);
// now has random publisher restrictions

GVLFactory

Get latest GVL

import {GVLFactory} from '@iabtechlabtcf/testing';
import {GVL} from '@iabtechlabtcf/core';

const gvl = GVLFactory.getLatest();

Get version of GVL

import {GVLFactory} from '@iabtechlabtcf/testing';
import {GVL} from '@iabtechlabtcf/core';

const gvl = GVLFactory.getVersion(10);

Package Sidebar

Install

npm i @testing-org-32/testing

Homepage

iabtcf.com/

Weekly Downloads

0

Version

1.5.14

License

Apache-2.0

Unpacked Size

11.3 MB

Total Files

218

Last publish

Collaborators

  • kiyuulight