MCPcopy Create free account
hub / github.com/npm/cli / setBlocking

Function setBlocking

lib/utils/display.js:69–77  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

67}
68
69const setBlocking = (stream) => {
70 // Copied from https://github.com/yargs/set-blocking
71 // https://raw.githubusercontent.com/yargs/set-blocking/master/LICENSE.txt
72 /* istanbul ignore next - we trust that this works */
73 if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') {
74 stream._handle.setBlocking(true)
75 }
76 return stream
77}
78
79// This is the key that is returned to the user for errors
80const ERROR_KEY = 'error'

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected