Socket
Socket
Sign inDemoInstall

@command-socket/core

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@command-socket/core - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

2

package.json
{
"name": "@command-socket/core",
"version": "0.3.0",
"version": "0.4.0",
"description": "A command-based WebSocket communication framework written in TypeScript/JavaScript.",

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -67,3 +67,4 @@ /*

LCS extends CommandSetStructure = any,
RCS extends CommandSetStructure = any> { // TODO [2/21/20 @ 2:56 PM] - Remove default generic types.
RCS extends CommandSetStructure = any,
M extends {} = {}> { // TODO [2/21/20 @ 2:56 PM] - Remove default generic types.

@@ -107,4 +108,6 @@ /**

public constructor(socket: ISocket, commandRegistry: CommandRegistry<LCS> = new CommandRegistry<LCS>()) {
private metadata: Partial<M>;
public constructor(socket: ISocket, commandRegistry: CommandRegistry<LCS> = new CommandRegistry<LCS>(), metadata: Partial<M> = {}) {
this.id = IDUtilities.generateID(CommandSocket.ID_LENGTH);

@@ -117,2 +120,3 @@ this.socket = socket;

this.events = new CommandSocketEvents();
this.metadata = metadata;

@@ -373,2 +377,8 @@ this.socket.getEvents().OPEN.subscribe((event: { source: ISocket }): void => {

public getMetadata(): Partial<M> {
return this.metadata;
}
public getCommandRegistry(): CommandRegistry<LCS & BuiltinCommandSet> {

@@ -375,0 +385,0 @@

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