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
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.1.5 to 0.2.0

1

dist/Profiler.d.ts

@@ -23,4 +23,5 @@ interface Opts {

updateContact(opts: UpdateContactOpts): Promise<void>;
private handlePersonalizations;
private network;
}
export default Profiler;

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

}
this.handlePersonalizations();
}

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

};
Profiler.prototype.handlePersonalizations = function () {
return __awaiter(this, void 0, void 0, function () {
var response, data_1, error_3;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 4, , 5]);
if (!window) return [3 /*break*/, 3];
return [4 /*yield*/, fetch(profilerURL + "/personalizations", {
mode: 'cors'
})];
case 1:
response = _a.sent();
if (!(response.status === 200)) return [3 /*break*/, 3];
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 4:
error_3 = _a.sent();
console.error(error_3);
return [3 /*break*/, 5];
case 5: return [2 /*return*/];
}
});
});
};
Profiler.prototype.network = function (endpoint, data, asJSON) {
return __awaiter(this, void 0, void 0, function () {
var url, response, json, error_3;
var url, response, json, error_4;
return __generator(this, function (_a) {

@@ -128,4 +163,4 @@ switch (_a.label) {

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

@@ -132,0 +167,0 @@ case 4: return [2 /*return*/];

2

package.json
{
"name": "@ludens-reklame/profiler-client",
"version": "0.1.5",
"version": "0.2.0",
"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