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

Method commit

lib/internal/readline/promises.js:124–129  ·  view source on GitHub ↗

* Sends all the pending actions to the associated `stream` and clears the * internal list of pending actions. * @returns {Promise } Resolves when all pending actions have been * flushed to the associated `stream`.

()

Source from the content-addressed store, hash-verified

122 * flushed to the associated `stream`.
123 */
124 commit() {
125 return new Promise((resolve) => {
126 this.#stream.write(ArrayPrototypeJoin(this.#todo, ''), resolve);
127 this.#todo = [];
128 });
129 }
130
131 /**
132 * Clears the internal list of pending actions without sending it to the

Callers 1

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected