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

Function isOrBecomesClosed

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

Source from the content-addressed store, hash-verified

920 }
921
922 function isOrBecomesClosed(stream, promise, action) {
923 if (stream.state === 'closed') {
924 action();
925 } else {
926 promise.then(action).catch(ignoreReason);
927 }
928 }
929
930 function shutdownWithAction(action, originalIsError, originalError) {
931 if (shuttingDown === true) {

Callers 1

ReadableStreamPipeToFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected