MCPcopy Index your code
hub / github.com/larksuite/cli / isSubset

Function isSubset

scripts/issue-labels/test.js:29–35  ·  view source on GitHub ↗

* Check whether every element in sub exists in sup. * * @param {string[]} sub * @param {string[]} sup * @returns {boolean}

(sub, sup)

Source from the content-addressed store, hash-verified

27 * @returns {boolean}
28 */
29function isSubset(sub, sup) {
30 const set = new Set(sup || []);
31 for (const x of sub || []) {
32 if (!set.has(x)) return false;
33 }
34 return true;
35}
36
37let passed = 0;
38let failed = 0;

Callers 1

test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected