Skip to content

Commit

Permalink
chore: remove redundant async in readable.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Sep 23, 2024
1 parent 0d00e46 commit 491eb3b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/api/readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class BodyReadable extends Readable {
* @see https://fetch.spec.whatwg.org/#dom-body-text
* @returns {Promise<string>}
*/
async text () {
text () {
return consume(this, 'text')
}

Expand All @@ -174,7 +174,7 @@ class BodyReadable extends Readable {
* @see https://fetch.spec.whatwg.org/#dom-body-json
* @returns {Promise<unknown>}
*/
async json () {
json () {
return consume(this, 'json')
}

Expand All @@ -184,7 +184,7 @@ class BodyReadable extends Readable {
* @see https://fetch.spec.whatwg.org/#dom-body-blob
* @returns {Promise<Blob>}
*/
async blob () {
blob () {
return consume(this, 'blob')
}

Expand All @@ -194,7 +194,7 @@ class BodyReadable extends Readable {
* @see https://fetch.spec.whatwg.org/#dom-body-bytes
* @returns {Promise<Uint8Array>}
*/
async bytes () {
bytes () {
return consume(this, 'bytes')
}

Expand All @@ -204,7 +204,7 @@ class BodyReadable extends Readable {
* @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer
* @returns {Promise<ArrayBuffer>}
*/
async arrayBuffer () {
arrayBuffer () {
return consume(this, 'arrayBuffer')
}

Expand Down Expand Up @@ -355,7 +355,7 @@ function isUnusable (bodyReadable) {
* @param {string} type
* @returns {Promise<any>}
*/
async function consume (stream, type) {
function consume (stream, type) {
assert(!stream[kConsume])

return new Promise((resolve, reject) => {
Expand Down

0 comments on commit 491eb3b

Please sign in to comment.