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

@@ -23,7 +23,7 @@ export async function saveTmpFirmware(data: Array<number>): Promise<TmpFirmware>
function writeDataToFile(data: Array<number>, filePath: string): Promise<void> {
return new Promise((resolve, reject) => {
const buffer = new Buffer(data);
const buffer = Buffer.from(data);
fs.writeFile(filePath, buffer, err => {
if (err) {