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:
@@ -157,6 +157,10 @@ class HyperP2PMultisigThreshold extends EventEmitter {
|
||||
return this.snapshot().proposals === 0
|
||||
}
|
||||
|
||||
size () {
|
||||
return this.snapshot().proposals
|
||||
}
|
||||
|
||||
createProposalBatch (entries) {
|
||||
if (!Array.isArray(entries)) throw new Error('entries array required')
|
||||
return entries.map((e) => this.createProposal(e.id, e.signers, e.threshold))
|
||||
|
||||
Reference in New Issue
Block a user