From 491eb3b498774b1b9280e8c02e772fe7dab9815f Mon Sep 17 00:00:00 2001 From: uzlopak Date: Mon, 23 Sep 2024 12:21:18 +0200 Subject: [PATCH] chore: remove redundant async in readable.js --- lib/api/readable.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/api/readable.js b/lib/api/readable.js index 4e440b213c8..bf91b06060d 100644 --- a/lib/api/readable.js +++ b/lib/api/readable.js @@ -164,7 +164,7 @@ class BodyReadable extends Readable { * @see https://fetch.spec.whatwg.org/#dom-body-text * @returns {Promise} */ - async text () { + text () { return consume(this, 'text') } @@ -174,7 +174,7 @@ class BodyReadable extends Readable { * @see https://fetch.spec.whatwg.org/#dom-body-json * @returns {Promise} */ - async json () { + json () { return consume(this, 'json') } @@ -184,7 +184,7 @@ class BodyReadable extends Readable { * @see https://fetch.spec.whatwg.org/#dom-body-blob * @returns {Promise} */ - async blob () { + blob () { return consume(this, 'blob') } @@ -194,7 +194,7 @@ class BodyReadable extends Readable { * @see https://fetch.spec.whatwg.org/#dom-body-bytes * @returns {Promise} */ - async bytes () { + bytes () { return consume(this, 'bytes') } @@ -204,7 +204,7 @@ class BodyReadable extends Readable { * @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer * @returns {Promise} */ - async arrayBuffer () { + arrayBuffer () { return consume(this, 'arrayBuffer') } @@ -355,7 +355,7 @@ function isUnusable (bodyReadable) { * @param {string} type * @returns {Promise} */ -async function consume (stream, type) { +function consume (stream, type) { assert(!stream[kConsume]) return new Promise((resolve, reject) => {