MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / abort

Method abort

examples/io/streams/modules/streams.js:2194–2201  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

2192 return IsWritableStreamLocked(stream);
2193 }
2194 abort(reason) {
2195 const stream = WritableStreamBrand.get(this);
2196 if (!stream)
2197 return Promise.reject(new TypeError("stream locked"));
2198 if (IsWritableStreamLocked(stream))
2199 return Promise.reject(new TypeError("stream locked"));
2200 return WritableStreamAbort(stream, reason);
2201 }
2202 close() {
2203 const stream = WritableStreamBrand.get(this);
2204 if (IsWritableStreamLocked(stream))

Callers

nothing calls this directly

Calls 3

IsWritableStreamLockedFunction · 0.85
WritableStreamAbortFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected