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

@@ -11,7 +11,7 @@ export class TestPeripheral implements Peripheral {
const response = {
tag: ResponseTags.Generic,
code: ResponseCodes.Success,
raw: new Buffer(0)
raw: Buffer.alloc(0)
};
return Promise.resolve(response);
@@ -22,6 +22,6 @@ export class TestPeripheral implements Peripheral {
}
readMemory(startAddress: number, count: number): Promise<Buffer> {
return Promise.resolve(new Buffer(0));
return Promise.resolve(Buffer.alloc(0));
}
}