MCPcopy
hub / github.com/vitest-dev/vitest / on

Function on

packages/vitest/src/node/stdin.ts:249–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247
248 let rl: readline.Interface | undefined
249 function on() {
250 off()
251 rl = readline.createInterface({ input: stdin, escapeCodeTimeout: 50 })
252 readline.emitKeypressEvents(stdin, rl)
253 if (stdin.isTTY) {
254 stdin.setRawMode(true)
255 }
256 stdin.on('keypress', keypressHandler)
257 }
258
259 function off() {
260 rl?.close()

Callers 4

inputNamePatternFunction · 0.70
inputProjectNameFunction · 0.70
inputFilePatternFunction · 0.70
registerConsoleShortcutsFunction · 0.70

Calls 2

offFunction · 0.70
onMethod · 0.45

Tested by

no test coverage detected