@gama-academy/lgpd
Advanced tools
Comparing version 0.0.6 to 0.1.0
const Lgpd = require('./') | ||
Lgpd.listenToActiveCampaignForm() |
@@ -0,0 +0,0 @@ export interface Consent { |
10
index.js
@@ -55,11 +55,3 @@ "use strict"; | ||
function giveConsent(consent, options) { | ||
var _a; | ||
if (options === void 0) { options = {}; } | ||
var DeviceInfo; | ||
if (!consent.anonymizedDevice) { | ||
DeviceInfo = require("react-native-device-info"); | ||
if (!DeviceInfo) { | ||
throw new Error("Device info not found, please install react-native-device-info or provide something via the anonymizedDevice option."); | ||
} | ||
} | ||
options = __assign(__assign({}, optionDefaults), options); | ||
@@ -70,3 +62,3 @@ return fetch(options.endpoint, { | ||
userId: consent.userId, | ||
anonymizedDevice: (_a = consent.anonymizedDevice) !== null && _a !== void 0 ? _a : DeviceInfo.getUniqueId(), | ||
anonymizedDevice: consent.anonymizedDevice, | ||
source: consent.source, | ||
@@ -73,0 +65,0 @@ contract: consent.contract, |
{ | ||
"name": "@gama-academy/lgpd", | ||
"version": "0.0.6", | ||
"version": "0.1.0", | ||
"description": "A client for the LGPD consent service", | ||
@@ -12,5 +12,2 @@ "main": "index.js", | ||
"license": "UNLICENSED", | ||
"peerDependencies": { | ||
"react-native-device-info": "^8.1.3" | ||
}, | ||
"devDependencies": { | ||
@@ -17,0 +14,0 @@ "@types/jest": "^26.0.24", |
@@ -10,6 +10,3 @@ /* Only for web UMD bundles */ | ||
filename: './active-campaign.bundle.js' | ||
}, | ||
externals: { | ||
'react-native-device-info': 'commonjs react-native-device-info' | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
2
10105
6
158