refactor: use Buffer.from and Buffer.alloc instead of new Buffer() (#957)
This commit is contained in:
committed by
László Monda
parent
999feea488
commit
82c9126d82
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user