Socket
Socket
Sign inDemoInstall

@iabtcf/testing

Package Overview
Dependencies
5
Maintainers
2
Versions
78
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iabtcf/testing

Shared testing utilities


Version published
Maintainers
2
Weekly downloads
86
decreased by-27.73%

Weekly downloads

Readme

Source

NPM version npm module downloads per month InteractiveAdvertisingBureau

@iabtcf/testing

Testing tools to generate randomized input/output

Installation

npm

npm install @iabtcf/testing --save-dev

yarn

yarn add -D @iabtcf/testing
Utilities

TCModelFactory

Generate random TCModel with GVL


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

const tcModel = TCModelFactory.withGVL();

Generate random TC string

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

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

Add publisher restrictions


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

GVLFactory

Get latest GVL

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

const gvl = GVLFactory.getLatest();

Get version of GVL

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

const gvl = GVLFactory.getVersion(10);

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