Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eva-events

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

eva-events - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

16

lib/beep-boop.js

@@ -124,1 +124,17 @@ // BeepBoop is the language spoken by Eva.

}
/**
* Given an object describing a message, throws if the message is invalid.
* @param {Object} m
*/
function validateMessage(m) {
if (m.UID === 0xffffffff) {
if (m.eventName !== '' || m.data !== null) {
throw new SyntaxError('Malformed message received. DoneMessage must have:\n eventName === ""\n data === null')
}
} else if (m.UID === 0) {
if (m.flags.isReponse) {
throw new SyntaxError('Malformed message received. OneWayMessage must have:n\n flags.isReponse === false')
}
}
}

4

lib/eva.js

@@ -46,3 +46,3 @@ 'use strict'

if (ev.code === 4200) {self.kill()} // User-initiated unclean kill.
else if (ev.code === 4202) {fatalError(self, new Error('Remotely requested operation timed out.'), 4202)}
else if (ev.code === 4202) {fatalError(self, new Error('Peer-requested operation timed out.'), 4202)}
else if (ev.code === 4203) {self.kill()} // Remote graceful death timeout.

@@ -110,3 +110,3 @@ else {fatalError(self, new Error(self._state === STATES.CONNECTING ? 'A connection could not be made.' : 'A problem occurred and the connection was closed.'))}

this.on('error', function () {})
this._internal.emit('error')
this._internal.emit('error', this._fatalError)
}

@@ -113,0 +113,0 @@ if (!wasDone) {

{
"name": "eva-events",
"version": "0.1.0",
"version": "0.2.0",
"description": "Eva is like an EventEmitter, but over WebSockets.",

@@ -5,0 +5,0 @@ "main": "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