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

Method setupHistoryManager

lib/internal/readline/interface.js:384–412  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

382 }
383
384 setupHistoryManager(options) {
385 this.historyManager = new ReplHistory(this, options);
386
387 if (options.onHistoryFileLoaded) {
388 this.historyManager.initialize(options.onHistoryFileLoaded);
389 }
390
391 ObjectDefineProperty(this, 'history', {
392 __proto__: null, configurable: true, enumerable: true,
393 get() { return this.historyManager.history; },
394 set(newHistory) { return this.historyManager.history = newHistory; },
395 });
396
397 ObjectDefineProperty(this, 'historyIndex', {
398 __proto__: null, configurable: true, enumerable: true,
399 get() { return this.historyManager.index; },
400 set(historyIndex) { return this.historyManager.index = historyIndex; },
401 });
402
403 ObjectDefineProperty(this, 'historySize', {
404 __proto__: null, configurable: true, enumerable: true,
405 get() { return this.historyManager.size; },
406 });
407
408 ObjectDefineProperty(this, 'isFlushing', {
409 __proto__: null, configurable: true, enumerable: true,
410 get() { return this.historyManager.isFlushing; },
411 });
412 }
413
414 [kSetRawMode](mode) {
415 const wasInRawMode = this.input.isRaw;

Callers 2

setupHistoryMethod · 0.80
InterfaceConstructorFunction · 0.80

Calls 1

initializeMethod · 0.45

Tested by

no test coverage detected