MCPcopy Index your code
hub / github.com/nodejs/node / lazyWritableReleasedError

Function lazyWritableReleasedError

lib/internal/webstreams/writablestream.js:124–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122let releasedError;
123
124function lazyWritableReleasedError() {
125 if (releasedError) {
126 return releasedError;
127 }
128 const userModuleRegExp = /^ {4}at (?:[^/\\(]+ \()(?!node:(.+):\d+:\d+\)$).*/gm;
129
130 releasedError = new ERR_INVALID_STATE.TypeError('Writer has been released');
131 // Avoid V8 leak and remove userland stackstrace
132 releasedError.stack = SideEffectFreeRegExpPrototypeSymbolReplace(userModuleRegExp, releasedError.stack, '');
133 return releasedError;
134}
135
136/**
137 * @typedef {import('../abort_controller').AbortSignal} AbortSignal

Callers 3

writerClosedPromiseFunction · 0.85
writerReadyPromiseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…