consent-string
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40531
954