Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iabtcf/testing

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iabtcf/testing

Shared testing utilities

  • 1.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
76
decreased by-10.59%
Maintainers
1
Weekly downloads
 
Created
Source

@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.decode(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

Package last updated on 09 Sep 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc