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.0.2 to 0.0.3

4

dist/Profiler.d.ts

@@ -9,7 +9,5 @@ interface Opts {

}
export interface RequestData {
[key: string]: any;
}
declare class Profiler {
private organization;
private contactRef;
constructor(opts: Opts);

@@ -16,0 +14,0 @@ push(opts: PushOpts): Promise<void>;

@@ -43,2 +43,5 @@ "use strict";

this.organization = opts.organization;
if (window && 'localStorage' in window) {
this.contactRef = window.localStorage.getItem('profilerRef');
}
}

@@ -58,3 +61,3 @@ Profiler.prototype.push = function (opts) {

return [4 /*yield*/, this.network(endpoint, {
ref: opts.contactRef,
ref: opts.contactRef || this.contactRef,
value: opts.value

@@ -76,7 +79,7 @@ })];

return __awaiter(this, void 0, void 0, function () {
var url, error_2;
var url, response, json, error_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
_a.trys.push([0, 3, , 4]);
url = profilerURL + "/" + endpoint + "?" + qs.stringify(data);

@@ -87,9 +90,16 @@ return [4 /*yield*/, fetch(url, {

case 1:
_a.sent();
return [3 /*break*/, 3];
response = _a.sent();
return [4 /*yield*/, response.json()];
case 2:
json = (_a.sent());
if (json.ref && window && 'localStorage' in window) {
window.localStorage.setItem('profilerRef', json.ref);
this.contactRef = json.ref;
}
return [3 /*break*/, 4];
case 3:
error_2 = _a.sent();
console.error(error_2);
return [3 /*break*/, 3];
case 3: return [2 /*return*/];
return [3 /*break*/, 4];
case 4: return [2 /*return*/];
}

@@ -96,0 +106,0 @@ });

{
"name": "@ludens-reklame/profiler-client",
"version": "0.0.2",
"version": "0.0.3",
"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