MCPcopy Create free account
hub / github.com/basecamp/omarchy / guardScript

Function guardScript

shell/plugins/menu/MenuModel.js:466–478  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

464// the last evaluation's answers, so however long this takes is how long a row
465// can contradict the state it describes.
466function guardScript(items) {
467 var guards = ""
468 var ids = Object.keys(items || {})
469
470 for (var i = 0; i < ids.length; i++) {
471 var entry = items[ids[i]]
472 if (!entry) continue
473 if (entry.when) guards += guardLine(ids[i], "w", entry.when)
474 if (entry.checked) guards += guardLine(ids[i], "c", entry.checked)
475 }
476
477 return guards ? guardPrelude(guards) + guards : ""
478}
479
480if (typeof module !== "undefined") {
481 module.exports = {

Callers

nothing calls this directly

Calls 2

guardLineFunction · 0.85
guardPreludeFunction · 0.85

Tested by

no test coverage detected