MCPcopy Index your code
hub / github.com/nodejs/node / [kDeleteLeft]

Method [kDeleteLeft]

lib/internal/readline/interface.js:808–820  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

806 }
807
808 [kDeleteLeft]() {
809 if (this.cursor > 0 && this.line.length > 0) {
810 this[kBeforeEdit](this.line, this.cursor);
811 // The number of UTF-16 units comprising the character to the left
812 const charSize = charLengthLeft(this.line, this.cursor);
813 this.line =
814 StringPrototypeSlice(this.line, 0, this.cursor - charSize) +
815 StringPrototypeSlice(this.line, this.cursor, this.line.length);
816
817 this.cursor -= charSize;
818 this[kRefreshLine]();
819 }
820 }
821
822 [kDeleteRight]() {
823 if (this.cursor < this.line.length) {

Callers

nothing calls this directly

Calls 1

charLengthLeftFunction · 0.85

Tested by

no test coverage detected