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

serialport

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serialport - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

changelog.md

@@ -0,1 +1,5 @@

Version 1.0.2
-------------
- Fixed issue 59 - https://github.com/voodootikigod/node-serialport/issues/59
Version 1.0.1

@@ -2,0 +6,0 @@ -------------

2

package.json
{
"name": "serialport",
"version": "1.0.1",
"version": "1.0.2",
"description": "Welcome your robotic javascript overlords. Better yet, program them!",

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

@@ -15,3 +15,3 @@ <pre>

Version: 1.0.0 - Released July 13, 2012 - Now with Windows Support!!!
Version: 1.0.2 - Released July 27, 2012 - Now with Windows Support!!!

@@ -63,3 +63,3 @@ *****

The options object allows you to pass named options to the serial port during initialization. The valid attributes for the options object are the following
The options object allows you to pass named options to the serial port during initialization. The valid attributes for the options object are the following:

@@ -73,2 +73,5 @@ * baudrate: Baud Rate, defaults to 9600. Must be one of: 115200, 57600, 38400, 19200, 9600, 4800, 2400, 1800, 1200, 600, 300, 200, 150, 134, 110, 75, or 50.

**Note, we have added support for either all lowercase OR camelcase of the options (thanks @jagautier), use whichever style you prefer.**
Parsers

@@ -75,0 +78,0 @@ -------

@@ -52,3 +52,3 @@ "use strict";

};
function SerialPort(path, options) {
function SerialPort (path, options) {
options = options || {};

@@ -72,2 +72,5 @@ options.__proto__ = _options;

}
if (!path) {
throw new Error('Invalid port specified: ' + path);
}

@@ -94,2 +97,5 @@ stream.Stream.call(this);

options.disconnectedCallback = function () {
if (self.closing) {
return;
}
self.emit('error', new Error("Disconnected"));

@@ -105,14 +111,16 @@ self.close();

self.fd = fd;
self.readStream = fs.createReadStream(path, { bufferSize: options.bufferSize, fd: fd });
self.readStream.on("data", options.dataCallback);
self.readStream.on("error", options.errorCallback);
self.readStream.on("close", function () {
self.close();
});
self.readStream.on("end", function () {
self.emit('end');
});
if (err) {
return self.emit('error', err);
}
if (process.platform !== 'win32') {
self.readStream = fs.createReadStream(path, { bufferSize: options.bufferSize, fd: fd });
self.readStream.on("data", options.dataCallback);
self.readStream.on("error", options.errorCallback);
self.readStream.on("close", function () {
self.close();
});
self.readStream.on("end", function () {
self.emit('end');
});
}

@@ -119,0 +127,0 @@ self.emit('open');

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