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

@ludens-reklame/profiler-client

Package Overview
Dependencies
Maintainers
9
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ludens-reklame/profiler-client - npm Package Compare versions

Comparing version 2.1.3 to 2.2.0

2

dist/Profiler.d.ts

@@ -67,2 +67,3 @@ interface Opts {

private personalize;
private pid?;
constructor(opts: Opts);

@@ -81,3 +82,4 @@ updateProfile(opts: UpdateProfileOpts): Promise<void>;

private removePersonalizations;
private readPidFromCookie;
}
export default Profiler;

@@ -40,2 +40,3 @@ "use strict";

var qs = require("qs");
var cookies = require("js-cookie");
var profilerURL = 'https://api.profiler.marketing';

@@ -47,2 +48,3 @@ var PERSONALIZATION_CLASS_NAME = '__prfPrs';

this.personalize = opts.personalize || false;
this.readPidFromCookie();
this.handlePersonalizations();

@@ -176,3 +178,4 @@ this.registerSource();

query = {
organization: this.organization
organization: this.organization,
ref: this.pid
};

@@ -330,6 +333,9 @@ return [4 /*yield*/, fetch(profilerURL + "/personalization?" + qs.stringify(query), {

return __awaiter(this, void 0, void 0, function () {
var url, response;
var url, response, responseJSON;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (typeof this.pid === 'string') {
data['ref'] = this.pid;
}
url = profilerURL + "/" + endpoint;

@@ -350,2 +356,8 @@ if (!asJSON) {

response = _a.sent();
return [4 /*yield*/, response.json()];
case 2:
responseJSON = _a.sent();
if (!!responseJSON && 'ref' in responseJSON) {
this.pid = responseJSON.ref;
}
return [2 /*return*/, response];

@@ -366,2 +378,8 @@ }

};
Profiler.prototype.readPidFromCookie = function () {
var pid = cookies.get('_pid');
if (typeof pid === 'string') {
this.pid = pid;
}
};
return Profiler;

@@ -368,0 +386,0 @@ }());

4

package.json
{
"name": "@ludens-reklame/profiler-client",
"version": "2.1.3",
"version": "2.2.0",
"description": "Profiler for all",

@@ -17,2 +17,3 @@ "main": "dist/index.js",

"devDependencies": {
"@types/js-cookie": "^2.2.4",
"@types/qs": "^6.5.1",

@@ -25,4 +26,5 @@ "awesome-typescript-loader": "^5.2.1",

"dependencies": {
"js-cookie": "^2.2.1",
"qs": "^6.6.0"
}
}

Sorry, the diff of this file is not supported yet

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