MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / remove

Function remove

src/lib/actionStack.js:110–120  ·  view source on GitHub ↗

* Remove action with given id from stack * @param {String} id * @returns {Boolean}

(id)

Source from the content-addressed store, hash-verified

108 * @returns {Boolean}
109 */
110 remove(id) {
111 for (let i = 0; i < stack.length; ++i) {
112 let action = stack[i];
113 if (action.id === id) {
114 stack.splice(i, 1);
115 return true;
116 }
117 }
118
119 return false;
120 },
121 /**
122 * Check if action with given id exists in stack
123 * @param {String} id

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected