@blotoutio/edgetag-sdk-js
Advanced tools
Comparing version 0.36.1 to 0.36.2
@@ -73,2 +73,29 @@ 'use strict'; | ||
}; | ||
const areEqual = (a, b) => { | ||
if (typeof a !== typeof b || | ||
Array.isArray(a) !== Array.isArray(b) || | ||
isNaN(a) !== isNaN(b)) { | ||
return false; | ||
} | ||
if (typeof a !== 'object' || a === null) { | ||
return a === b; | ||
} | ||
const as = Object.keys(a); | ||
const bs = Object.keys(b); | ||
if (as.length !== bs.length) | ||
return false; | ||
for (const key of as) { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
if (!(key in b)) { | ||
return false; | ||
} | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
if (!areEqual(a[key], b[key])) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
}; | ||
@@ -339,3 +366,3 @@ const tagStorage = 'edgeTag'; | ||
locale: getLocale(), | ||
sdkVersion: "0.36.1" , | ||
sdkVersion: "0.36.2" , | ||
...(payload || {}), | ||
@@ -728,2 +755,6 @@ }; | ||
const handleConsent = (consent, options) => { | ||
const existingConsent = getConsent$1(); | ||
if (areEqual(existingConsent, consent)) { | ||
return; | ||
} | ||
const payload = { | ||
@@ -730,0 +761,0 @@ consentString: consent, |
{ | ||
"name": "@blotoutio/edgetag-sdk-js", | ||
"version": "0.36.1", | ||
"version": "0.36.2", | ||
"description": "JS SDK for EdgeTag", | ||
@@ -5,0 +5,0 @@ "author": "Blotout", |
Sorry, the diff of this file is not supported yet
66246
2227