Package Exports
- didomi-iabtcf-testing
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (didomi-iabtcf-testing) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
didomi-iabtcf-testing
Testing tools to generate randomized input/output
Installation
npm
npm install didomi-iabtcf-testing --save-dev
yarn
yarn add -D didomi-iabtcf-testing
Utilities
Generate random TCModel with GVL
import { TCModelFactory } from "didomi-iabtcf-testing";
const tcModel = TCModelFactory.withGVL();
Generate random TC string
import { TCString } from "didomi-iabtcf-core";
import { TCModelFactory } from "didomi-iabtcf-testing";
console.log(TCString.decode(TCModelFactory.noGVL()));
// ... random tc string
Add publisher restrictions
import { TCModelFactory } from "didomi-iabtcf-testing";
let tcModel = TCModelFactory.withGVL();
tcModel = TCModelFactory.addPublisherRestrictions(tcModel);
// now has random publisher restrictions
Get latest GVL
import { GVLFactory } from "didomi-iabtcf-testing";
import { GVL } from "didomi-iabtcf-core";
const gvl = GVLFactory.getLatest();
Get version of GVL
import { GVLFactory } from "didomi-iabtcf-testing";
import { GVL } from "didomi-iabtcf-core";
const gvl = GVLFactory.getVersion(10);