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

Method setupHistory

lib/repl.js:970–981  ·  view source on GitHub ↗
(historyConfig = { __proto__: null }, cb)

Source from the content-addressed store, hash-verified

968 self.displayPrompt();
969 }
970 setupHistory(historyConfig = { __proto__: null }, cb) {
971 // TODO(puskin94): necessary because historyConfig can be a string for backwards compatibility
972 const options = typeof historyConfig === 'string' ?
973 { filePath: historyConfig } :
974 historyConfig;
975
976 if (typeof cb === 'function') {
977 options.onHistoryFileLoaded = cb;
978 }
979
980 this.setupHistoryManager(options);
981 }
982 clearBufferedCommand() {
983 this[kBufferedCommandSymbol] = '';
984 }

Callers 4

createReplFunction · 0.80
runTestFunction · 0.80
runTestFunction · 0.80

Calls 1

setupHistoryManagerMethod · 0.80

Tested by

no test coverage detected