Removed 'new Buffer'

This commit is contained in:
Jasper 2022-09-10 01:54:26 +10:00
parent f35a8a4714
commit e40b28e52a
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ export function get(url, options = {}, callback) {
Remote.https.get(url, options, (error, res, body) => {
if (error) return emitter.emit("error", error);
emitter.emit("data", options && options.encoding === "binary" ? new Buffer(Buffer.from(body, "binary")) : body);
emitter.emit("data", options && options.encoding === "binary" ? Buffer.from(body, "binary") : body);
emitter.emit("end", res);
});