serialport
Advanced tools
Comparing version 0.2.4 to 0.2.5
{ "name" : "serialport", | ||
"version" : "0.2.4", | ||
"version" : "0.2.5", | ||
"description" : "Welcome your robotic javascript overlords. Better yet, program them!", | ||
@@ -4,0 +4,0 @@ "author": "Chris Williams <voodootikigod@gmail.com>", |
@@ -15,3 +15,3 @@ <pre> | ||
Version: 0.2.3 - Released March 19, 2011 | ||
Version: 0.2.5 - Released June 27, 2011 | ||
@@ -18,0 +18,0 @@ ***** |
@@ -29,16 +29,9 @@ "use strict"; | ||
return function (emitter, buffer) { | ||
// Collect data | ||
data += buffer.toString(); | ||
// Split collected data by delimiter | ||
data.split(delimiter).forEach(function (part, i, array) { | ||
if (i !== array.length-1) { | ||
// Fully delimited part. Lets emit it. | ||
emitter.emit('data', part); | ||
} | ||
else { | ||
// Last split part might be partial. We can't emit it just yet. | ||
data = part; | ||
} | ||
var parts = data.split(delimiter) | ||
data = parts.pop(); | ||
parts.forEach(function (part, i, array) { | ||
emitter.emit('data', part); | ||
}); | ||
@@ -45,0 +38,0 @@ }; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
1
21593
17
170