* @see https://streams.spec.whatwg.org/#readablestream-locked * @param {BodyReadable} bodyReadable * @returns {boolean}
(bodyReadable)
| 337 | * @returns {boolean} |
| 338 | */ |
| 339 | function isLocked (bodyReadable) { |
| 340 | // Consume is an implicit lock. |
| 341 | return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null |
| 342 | } |
| 343 | |
| 344 | /** |
| 345 | * @see https://fetch.spec.whatwg.org/#body-unusable |