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

devicestack

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devicestack - npm Package Compare versions

Comparing version 1.8.4 to 1.8.5

19

lib/connection.js

@@ -255,2 +255,21 @@ var EventEmitter2 = require('eventemitter2').EventEmitter2,

/**
* Checks if the passed argument is an array that contains byte values.
* @param {Array} data The array to be checked.
* @return {Boolean} True if it's a byte array, otherwise false.
*/
Connection.prototype.isByteArray = function(data) {
if (!data || !_.isArray(data)) {
return false;
}
for (var i = 0, len = data.length; i < len; i++) {
if (data[i] === null || data[i] === undefined || data[i] < 0x00 || data[i] > 0xff) {
return false;
}
}
return true;
};
/**
* Sends the passing command.

@@ -257,0 +276,0 @@ * Define your own command handling mechanism in extended connection!

2

package.json
{
"name": "devicestack",
"version": "1.8.4",
"version": "1.8.5",
"description": "This module helps you to represent a device and its protocol.",

@@ -5,0 +5,0 @@ "private": false,

@@ -214,2 +214,7 @@ <pre>

### isByteArray
Checks if the passed argument is an array that contains byte values.
- If extending from `require('devicestack').Connection` this function is already defined!
## framehandler(s)

@@ -844,2 +849,6 @@ You can have one or multiple framehandlers. A framhandler receives data from the upper layer and sends it to the lower layer by wrapping some header or footer information. A framehandler receives data from lower layer and sends it to the upper layer by unwrapping some header or footer information. The lowest layer for a framehandler is the device and the topmost ist the connection.

## v1.8.5
- Connection: added function isByteArray
## v1.8.4

@@ -846,0 +855,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