An addon for xterm.js that enables searching the buffer. This addon requires xterm.js v4+.
npm install --save @xterm/addon-search
import { Terminal } from '@xterm/xterm';
import { SearchAddon } from '@xterm/addon-search';
const terminal = new Terminal();
const searchAddon = new SearchAddon();
terminal.loadAddon(searchAddon);
searchAddon.findNext('foo');
See the full API for more advanced usage.