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

Function hintModification

src/components/inputhints/index.js:227–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

225 }
226
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) {
244 hints.splice(index, 1);
245 }
246 },
247 removeIndex(index) {
248 hints.splice(index, 1);
249 },
250 };
251 }
252
253 function ulAddEventListeners() {
254 window.addEventListener("resize", position);

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected