refactor: use Buffer.from and Buffer.alloc instead of new Buffer() (#957)

This commit is contained in:
Róbert Kiss
2019-05-29 21:56:01 +02:00
committed by László Monda
parent 999feea488
commit 82c9126d82
24 changed files with 47 additions and 47 deletions

View File

@@ -13,7 +13,7 @@ function getUint16(buffer, offset) {
let prevGeneric, prevBasic, prevMedia, prevSystem, prevMouse;
function getDebugInfo() {
const payload = new Buffer([uhk.usbCommands.getDebugBuffer]);
const payload = Buffer.from([uhk.usbCommands.getDebugBuffer]);
// console.log(payload)
// console.log('Sending ', uhk.bufferToString(payload));
device.write(uhk.getTransferData(payload));