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.1.1 to 0.1.2

9

dist/Profiler.d.ts

@@ -9,2 +9,10 @@ interface Opts {

}
interface UpdateContactData {
name?: string;
email?: string;
}
interface UpdateContactOpts {
data: UpdateContactData;
contactRef?: string;
}
declare class Profiler {

@@ -15,4 +23,5 @@ private organization;

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

40

dist/Profiler.js

@@ -75,12 +75,40 @@ "use strict";

};
Profiler.prototype.network = function (endpoint, data) {
Profiler.prototype.updateContact = function (opts) {
return __awaiter(this, void 0, void 0, function () {
var url, response, json, error_2;
var endpoint, error_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
endpoint = 'contacts/' + (opts.contactRef || this.contactRef);
return [4 /*yield*/, this.network(endpoint, opts.data, true)];
case 1:
_a.sent();
return [3 /*break*/, 3];
case 2:
error_2 = _a.sent();
console.error(error_2);
return [3 /*break*/, 3];
case 3: return [2 /*return*/];
}
});
});
};
Profiler.prototype.network = function (endpoint, data, asJSON) {
return __awaiter(this, void 0, void 0, function () {
var url, response, json, error_3;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 3, , 4]);
url = profilerURL + "/" + endpoint + "?" + qs.stringify(data);
url = profilerURL + "/" + endpoint;
if (!asJSON) {
url = url + ("?" + qs.stringify(data));
}
return [4 /*yield*/, fetch(url, {
method: 'POST'
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: asJSON ? JSON.stringify(data) : null
})];

@@ -98,4 +126,4 @@ case 1:

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

@@ -102,0 +130,0 @@ case 4: return [2 /*return*/];

2

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