@serialport/parser-cctalk
Advanced tools
Comparing version 1.0.5 to 2.0.1
@@ -1,4 +0,2 @@ | ||
'use strict' | ||
const Transform = require('stream').Transform | ||
const Buffer = require('safe-buffer').Buffer | ||
@@ -17,3 +15,3 @@ /** | ||
class CCTalkParser extends Transform { | ||
constructor () { | ||
constructor() { | ||
super() | ||
@@ -23,3 +21,3 @@ this.array = [] | ||
} | ||
_transform (buffer, _, cb) { | ||
_transform(buffer, _, cb) { | ||
this.cursor += buffer.length | ||
@@ -29,4 +27,3 @@ // TODO: Better Faster es7 no supported by node 4 | ||
// this.array = this.array.concat(Array.from(buffer)) //Slower ?!? | ||
Array.from(buffer) | ||
.map((byte) => this.array.push(byte)) | ||
Array.from(buffer).map(byte => this.array.push(byte)) | ||
while (this.cursor > 1 && this.cursor >= this.array[1] + 5) { | ||
@@ -33,0 +30,0 @@ // full frame accumulated |
{ | ||
"name": "@serialport/parser-cctalk", | ||
"version": "1.0.5", | ||
"version": "2.0.1", | ||
"main": "cctalk.js", | ||
"dependencies": { | ||
"safe-buffer": "^5.1.1" | ||
"engines": { | ||
"node": ">=6.0.0" | ||
}, | ||
@@ -14,4 +14,5 @@ "publishConfig": { | ||
"type": "git", | ||
"url": "git://github.com/node-serialport/parsers.git" | ||
} | ||
"url": "git://github.com/node-serialport/node-serialport.git" | ||
}, | ||
"gitHead": "40a06fb71d659940ed5058316b594b9da9957c2f" | ||
} |
@@ -1,1 +0,1 @@ | ||
See our api docs https://node-serialport.github.io/parsers/CCTalkParser.html | ||
See our api docs https://node-serialport.github.io/node-serialport/CCTalkParser.html |
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
3337
0
5
38
- Removedsafe-buffer@^5.1.1
- Removedsafe-buffer@5.2.1(transitive)