New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ludens-reklame/profiler-client

Package Overview
Dependencies
Maintainers
6
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 0.2.1 to 0.2.2

7

dist/Profiler.d.ts
interface Opts {
organization: string;
personalize?: boolean;
}

@@ -17,2 +18,7 @@ interface PushOpts {

}
interface Personalization {
_id: string;
name: string;
code: string;
}
declare class Profiler {

@@ -24,2 +30,3 @@ private organization;

updateContact(opts: UpdateContactOpts): Promise<void>;
getPersonalizations(): Promise<Personalization[]>;
private handlePersonalizations;

@@ -26,0 +33,0 @@ private network;

57

dist/Profiler.js

@@ -46,3 +46,5 @@ "use strict";

}
this.handlePersonalizations();
if (opts.personalize) {
this.handlePersonalizations();
}
}

@@ -98,5 +100,5 @@ Profiler.prototype.push = function (opts) {

};
Profiler.prototype.handlePersonalizations = function () {
Profiler.prototype.getPersonalizations = function () {
return __awaiter(this, void 0, void 0, function () {
var query, response, data_1, error_3;
var query, response, error_3;
return __generator(this, function (_a) {

@@ -106,3 +108,2 @@ switch (_a.label) {

_a.trys.push([0, 4, , 5]);
if (!window) return [3 /*break*/, 3];
query = {

@@ -119,12 +120,4 @@ organization: this.organization,

return [4 /*yield*/, response.json()];
case 2:
data_1 = (_a.sent());
document.addEventListener('DOMContentLoaded', function () {
for (var i = 0; i < data_1.length; i++) {
var ps = data_1[i];
document.body.innerHTML += ps.code;
}
});
_a.label = 3;
case 3: return [3 /*break*/, 5];
case 2: return [2 /*return*/, (_a.sent())];
case 3: return [2 /*return*/, []];
case 4:

@@ -134,3 +127,3 @@ error_3 = _a.sent();

return [3 /*break*/, 5];
case 5: return [2 /*return*/];
case 5: return [2 /*return*/, []];
}

@@ -140,5 +133,33 @@ });

};
Profiler.prototype.handlePersonalizations = function () {
return __awaiter(this, void 0, void 0, function () {
var personalizations_1, error_4;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 3, , 4]);
if (!window) return [3 /*break*/, 2];
return [4 /*yield*/, this.getPersonalizations()];
case 1:
personalizations_1 = _a.sent();
document.addEventListener('DOMContentLoaded', function () {
for (var i = 0; i < personalizations_1.length; i++) {
var ps = personalizations_1[i];
document.body.innerHTML += ps.code;
}
});
_a.label = 2;
case 2: return [3 /*break*/, 4];
case 3:
error_4 = _a.sent();
console.error(error_4);
return [3 /*break*/, 4];
case 4: return [2 /*return*/];
}
});
});
};
Profiler.prototype.network = function (endpoint, data, asJSON) {
return __awaiter(this, void 0, void 0, function () {
var url, response, json, error_4;
var url, response, json, error_5;
return __generator(this, function (_a) {

@@ -171,4 +192,4 @@ switch (_a.label) {

case 3:
error_4 = _a.sent();
console.error(error_4);
error_5 = _a.sent();
console.error(error_5);
return [3 /*break*/, 4];

@@ -175,0 +196,0 @@ case 4: return [2 /*return*/];

{
"name": "@ludens-reklame/profiler-client",
"version": "0.2.1",
"version": "0.2.2",
"description": "Profiler for all",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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