MCPcopy Create free account
hub / github.com/microsoft/SandDance / toggleSearch

Function toggleSearch

docs/app/js/sanddance-app.js:19425–19438  ·  view source on GitHub ↗
(haystack, needle)

Source from the content-addressed store, hash-verified

19423 return (0, _sanddanceReact.SandDance).searchExpression.compareGroup(comparableGroup(a), comparableGroup(b));
19424}
19425function toggleSearch(haystack, needle) {
19426 const groups = [];
19427 let found = false;
19428 //look for item in all
19429 haystack.forEach((group)=>{
19430 if (compareGroup(group, needle)) //if it exists, don't add it
19431 found = true;
19432 else groups.push(group);
19433 });
19434 return {
19435 groups,
19436 found
19437 };
19438}
19439
19440},{"@msrvida/sanddance-react":"4uo3s","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"8ePka":[function(require,module,exports) {
19441module.exports = React;

Callers

nothing calls this directly

Calls 2

compareGroupFunction · 0.70
forEachMethod · 0.45

Tested by

no test coverage detected