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

Function add

src/components/inputhints/index.js:229–240  ·  view source on GitHub ↗
(item, index)

Source from the content-addressed store, hash-verified

227 function hintModification() {
228 return {
229 add(item, index) {
230 if (index) {
231 hints.splice(index, 0, item);
232 const child = $ul.children[index];
233 if (child) {
234 $ul.insertBefore(child, $ul.children[index]);
235 }
236 return;
237 }
238
239 hints.push(item);
240 },
241 remove(item) {
242 const index = hints.indexOf(item);
243 if (index > -1) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected