MCPcopy
hub / github.com/enquirer/enquirer / delete

Method delete

lib/types/string.js:74–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 delete() {
75 let { cursor, input } = this.state;
76 if (cursor <= 0) return this.alert();
77 this.input = `${input}`.slice(0, cursor - 1) + `${input}`.slice(cursor);
78 this.moveCursor(-1);
79 this.render();
80 }
81
82 deleteForward() {
83 let { cursor, input } = this.state;

Callers

nothing calls this directly

Calls 3

moveCursorMethod · 0.95
renderMethod · 0.95
alertMethod · 0.80

Tested by

no test coverage detected