(items)
| 464 | // the last evaluation's answers, so however long this takes is how long a row |
| 465 | // can contradict the state it describes. |
| 466 | function 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 | |
| 480 | if (typeof module !== "undefined") { |
| 481 | module.exports = { |
nothing calls this directly
no test coverage detected