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

@serialized/serialized-client

Package Overview
Dependencies
Maintainers
3
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serialized/serialized-client - npm Package Compare versions

Comparing version 0.9.3 to 0.9.4

19

dist/AggregateRoot.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var isFunction = function (value) { return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function); };
var AggregateRoot = /** @class */ (function () {

@@ -20,3 +21,19 @@ function AggregateRoot(aggregateId, aggregateType) {

this.currentVersion = response.aggregateVersion;
response.events.map(function (e) { return _this['handle' + e.eventType](e); });
response.events.map(function (e) {
var handlerName = 'handle' + e.eventType;
var handler = _this[handlerName];
if (!(!handler && !isFunction(handler))) {
_this[handlerName](e);
}
else {
console.log("No handler for " + handlerName + ", will defer to generic handle() method");
var genericHandler = _this['handle'];
if (!(!genericHandler && !isFunction(genericHandler))) {
_this['handle'](e);
}
else {
throw Error("No handler available for event type: " + e.eventType);
}
}
});
};

@@ -23,0 +40,0 @@ AggregateRoot.prototype.getUncommittedEvents = function () {

2

package.json

@@ -6,3 +6,3 @@ {

"author": "Mattias Holmqvist",
"version": "0.9.3",
"version": "0.9.4",
"main": "dist/index.js",

@@ -9,0 +9,0 @@ "types": "dist/index.d.ts",

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