Add size() cardinality helper across modules (eighth pass).

Standardize a size() method after isEmpty() on every module with clearAll(), delegating to domain counts or snapshot fields so callers can query occupancy without parsing snapshots.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 05:10:42 -04:00
co-authored by Cursor
parent b3c6059598
commit de89303380
197 changed files with 820 additions and 0 deletions
@@ -122,6 +122,10 @@ class HyperBareTargetMatrix extends EventEmitter {
return this.snapshot().targets === 0
}
size () {
return this.snapshot().targets
}
addTargetBatch (entries) {
if (!Array.isArray(entries)) throw new Error('entries array required')
return entries.map((e) => this.addTarget(e.os, e.arch, e.extra || {}))