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

consent-string

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

consent-string - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

11

dist/consent-string.js

@@ -173,3 +173,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

value: function setGlobalVendorList(vendorList) {
if ((typeof vendorList === 'undefined' ? 'undefined' : _typeof(vendorList)) !== 'object' || !vendorList.version || !Array.isArray(vendorList.purposes) || !Array.isArray(vendorList.vendors)) {
if ((typeof vendorList === 'undefined' ? 'undefined' : _typeof(vendorList)) !== 'object') {
throw new Error('ConsentString - You must provide an object when setting the global vendor list');
}
if (!vendorList.version || !Array.isArray(vendorList.purposes) || !Array.isArray(vendorList.vendors)) {
// The provided vendor list does not look valid

@@ -179,7 +183,2 @@ throw new Error('ConsentString - The provided vendor list does not respect the schema from the IAB EU’s GDPR Consent and Transparency Framework');

if (vendorList.version !== 1) {
// We only support the version 1 of the format for now
throw new Error('ConsentString - This version of the Consent String library only supports the Consent String format');
}
this.vendorList = vendorList;

@@ -186,0 +185,0 @@ this.vendorListVersion = vendorList.version;

{
"name": "consent-string",
"version": "1.0.1",
"version": "1.0.2",
"description": "Encode and decode web-safe base64 consent information with the IAB EU's GDPR Transparency and Consent Framework",

@@ -5,0 +5,0 @@ "homepage": "http://advertisingconsent.eu/",

@@ -74,3 +74,3 @@ # Consent String

consentData.setCmpVersion(1);
consentData.setCmpScreen(1);
consentData.setConsentScreen(1);
consentData.setConsentLanguage('en');

@@ -124,3 +124,3 @@ consentData.setPurposesAllowed([1, 2, 4]);

consentData.setCmpId(1);
consentData.setCmpScreen(1);
consentData.setConsentScreen(1);
consentData.setPurposeAllowed(12, true);

@@ -127,0 +127,0 @@

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