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

@@ -5,7 +5,7 @@ const uhk = require('./uhk');
const slaveId = parseInt(process.argv[2]);
const device = uhk.getUhkDevice();
const sendData = new Buffer([uhk.usbCommands.getSlaveI2cErrors, slaveId]);
const sendData = Buffer.from([uhk.usbCommands.getSlaveI2cErrors, slaveId]);
device.write(uhk.getTransferData(sendData));
const response = Buffer.from(device.readSync());