MCPcopy Create free account
hub / github.com/BrainicHQ/DoHSpeedTest / createClassList

Function createClassList

tests/settings-persistence.test.mjs:8–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6const DOH_KEY = 'dns-speed-test-doh-servers-v1';
7
8function createClassList() {
9 const values = new Set();
10 return {
11 add: (...classes) => classes.forEach(cls => values.add(cls)),
12 remove: (...classes) => classes.forEach(cls => values.delete(cls)),
13 toggle: (cls, force) => {
14 const shouldAdd = force ?? !values.has(cls);
15 if (shouldAdd) values.add(cls);
16 else values.delete(cls);
17 return shouldAdd;
18 },
19 contains: cls => values.has(cls)
20 };
21}
22
23function createElement(id = '') {
24 const listeners = new Map();

Callers 1

createElementFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected