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

Function isOrBecomesErrored

examples/io/streams/modules/streams.js:914–920  ·  view source on GitHub ↗
(stream, promise, action)

Source from the content-addressed store, hash-verified

912 }
913
914 function isOrBecomesErrored(stream, promise, action) {
915 if (stream.state === 'errored') {
916 action(stream.storedError);
917 } else {
918 promise.catch(action);
919 }
920 }
921
922 function isOrBecomesClosed(stream, promise, action) {
923 if (stream.state === 'closed') {

Callers 1

ReadableStreamPipeToFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected