{"_id":"@cookiepal-labs/iabtcf-testing","_rev":"1-b5bf9e3c2bd789cc46e3f2b10bb3bbde","name":"@cookiepal-labs/iabtcf-testing","dist-tags":{"latest":"1.5.13"},"versions":{"1.5.13":{"name":"@cookiepal-labs/iabtcf-testing","version":"1.5.13","keywords":["interactive","advertising","bureau","iab","transparency","consent","consentstring","tcstring","gvl","vendor","framework","tcf","lib","library","cmp","2.0","v2.0","v2","software","development","api","kit","sdk","gdpr"],"author":{"name":"Mayank Mishra","email":"mayank@iabtechlab.com"},"license":"Apache-2.0","_id":"@cookiepal-labs/iabtcf-testing@1.5.13","maintainers":[{"name":"luis-ortiz","email":"luis.ortiz@westpoint.io"},{"name":"cookiepal","email":"support@cookiepal.io"}],"homepage":"https://iabtcf.com/","bugs":{"url":"https://github.com/InteractiveAdvertisingBureau/iabtcf-es/issues"},"dist":{"shasum":"5e634e4bb7812887ec33419b99eadeaf44affbaf","tarball":"https://registry.npmjs.org/@cookiepal-labs/iabtcf-testing/-/iabtcf-testing-1.5.13.tgz","fileCount":218,"integrity":"sha512-97jPvo7ttPPI3J7JQh9Lmw9OCkX4wDPIYSSKGAUBbp74b9AA0MunQdsVNjnUsXo16MYy1pzMej/YMQxkK7ZsQQ==","signatures":[{"sig":"MEYCIQDAiO27oj5CJEhUSq/j7waElxrFyJBB/KEUgD9eS/hW0QIhAKxuJKTPYMbrLzxd9hmE83BY8oDKGR5urlOwuo5OFMqo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11314486},"main":"lib/cjs/index.js","type":"module","types":"lib/mjs/index.d.ts","module":"lib/mjs/index.js","exports":{".":{"import":"./lib/mjs/index.js","require":"./lib/cjs/index.js"},"./lib/vendorlist/v2/*.json":"./lib/mjs/vendorlist/v2/*.json","./lib/vendorlist/v2.2/*.json":"./lib/mjs/vendorlist/v2.2/*.json"},"gitHead":"510282077166844627f9e929720b9da02ff9da0a","scripts":{"lint":"eslint `find src -name '*.ts'`","build":"../build ; cp -r src/vendorlist lib/mjs/ ; cp -r src/vendorlist lib/cjs/; yarn fix-cjs-import-require","preversion":"echo 'woops I think you meant to go to the root' && exit 1","fix-cjs-import-require":"cp lib/cjs/GVLFactory.cjs lib/cjs/GVLFactory.js"},"_npmUser":{"name":"luis-ortiz","email":"luis.ortiz@westpoint.io"},"repository":{"url":"git+https://github.com/InteractiveAdvertisingBureau/iabtcf-es.git","type":"git","directory":"modules/testing"},"_npmVersion":"10.2.4","description":"Shared testing utilities","directories":{},"_nodeVersion":"20.11.0","dependencies":{"sinon":"^13.0.1","sinon-chai":"^3.7.0","@types/sinon":"^10.0.11","mocha-eslint":"^7.0.0","@types/sinon-chai":"3.2.8"},"eslintIgnore":["lib"],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^9.2.0","eslint":"6.8.0","terser":"^4.8.1","ts-node":"10.9.1","typescript":"4.9.5","source-map-support":"^0.5.12"},"peerDependencies":{"@cookiepal-labs/iabtcf-core":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/iabtcf-testing_1.5.13_1724158071964_0.7449477540334375","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-08-20T12:47:51.886Z","modified":"2024-09-09T12:13:02.350Z","1.5.13":"2024-08-20T12:47:52.317Z"},"bugs":{"url":"https://github.com/InteractiveAdvertisingBureau/iabtcf-es/issues"},"author":{"name":"Mayank Mishra","email":"mayank@iabtechlab.com"},"license":"Apache-2.0","homepage":"https://iabtcf.com/","keywords":["interactive","advertising","bureau","iab","transparency","consent","consentstring","tcstring","gvl","vendor","framework","tcf","lib","library","cmp","2.0","v2.0","v2","software","development","api","kit","sdk","gdpr"],"repository":{"url":"git+https://github.com/InteractiveAdvertisingBureau/iabtcf-es.git","type":"git","directory":"modules/testing"},"description":"Shared testing utilities","maintainers":[{"email":"eduardo.guimaraes@westpoint.io","name":"duardolv.wp"},{"email":"luis.ortiz@westpoint.io","name":"luis-ortiz"},{"email":"support@cookiepal.io","name":"cookiepal"}],"readme":"[![NPM version](https://img.shields.io/npm/v/@iabtechlabtcf/testing.svg?style=flat-square)](https://www.npmjs.com/package/@iabtechlabtcf/testing)\n[![npm module downloads per month](http://img.shields.io/npm/dm/@iabtechlabtcf/testing.svg?style=flat)](https://www.npmjs.org/package/@iabtechlabtcf/testing)\n[![InteractiveAdvertisingBureau](https://circleci.com/gh/InteractiveAdvertisingBureau/iabtcf-es.svg?style=shield)](https://circleci.com/gh/InteractiveAdvertisingBureau/iabtcf-es)\n\n# @iabtechlabtcf/testing\n\nTesting tools to generate randomized input/output\n\n#### Installation\n\nnpm\n```\nnpm install @iabtechlabtcf/testing --save-dev\n```\n\nyarn\n```\nyarn add -D @iabtechlabtcf/testing\n```\n\n#### Utilities\n[TCModelFactory](./src/TCModelFactory.ts)\n\nGenerate random TCModel with GVL\n```typescript\n\nimport {TCModelFactory} from '@iabtechlabtcf/testing';\n\nconst tcModel = TCModelFactory.withGVL();\n\n```\n\nGenerate random TC string\n\n```typescript\nimport {TCString} from '@iabtechlabtcf/core';\nimport {TCModelFactory} from '@iabtechlabtcf/testing';\n\nconsole.log(TCString.encode(TCModelFactory.noGVL()));\n// ... random tc string\n\n```\n\nAdd publisher restrictions\n\n```typescript\n\nimport {TCModelFactory} from '@iabtechlabtcf/testing';\nlet tcModel = TCModelFactory.withGVL();\ntcModel = TCModelFactory.addPublisherRestrictions(tcModel);\n// now has random publisher restrictions\n\n```\n\n[GVLFactory](./src/GVLFactory.ts)\n\nGet latest GVL\n\n```typescript\nimport {GVLFactory} from '@iabtechlabtcf/testing';\nimport {GVL} from '@iabtechlabtcf/core';\n\nconst gvl = GVLFactory.getLatest();\n\n```\n\nGet version of GVL\n\n```typescript\nimport {GVLFactory} from '@iabtechlabtcf/testing';\nimport {GVL} from '@iabtechlabtcf/core';\n\nconst gvl = GVLFactory.getVersion(10);\n\n```\n","readmeFilename":"README.md"}