MCPcopy Index your code
hub / github.com/enquirer/enquirer / append

Method append

lib/types/string.js:63–68  ·  view source on GitHub ↗
(ch)

Source from the content-addressed store, hash-verified

61 }
62
63 append(ch) {
64 let { cursor, input } = this.state;
65 this.input = `${input}`.slice(0, cursor) + ch + `${input}`.slice(cursor);
66 this.moveCursor(String(ch).length);
67 this.render();
68 }
69
70 insert(str) {
71 this.append(str);

Callers 3

keypressMethod · 0.95
dispatchMethod · 0.95
insertMethod · 0.95

Calls 2

moveCursorMethod · 0.95
renderMethod · 0.95

Tested by

no test coverage detected