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

Function let

src/components/settingsPage.js:291–307  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

289
290function createSearchHandler(type, searchItems) {
291 let settingsPages;
292
293 return (key) => {
294 if (type === "united") {
295 const $items = [];
296 settingsPages ??= getSettingsPages(true);
297 settingsPages.forEach((page) => {
298 $items.push(...page.search(key));
299 });
300 return $items;
301 }
302
303 return searchItems.filter((item) => {
304 const text = item.textContent.toLowerCase();
305 return text.match(key, "i");
306 });
307 };
308}
309
310function getSettingsPages(includeLazyPages = false) {

Callers

nothing calls this directly

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected