MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / count

Method count

packages/core/src/entity/Collection.ts:339–342  ·  view source on GitHub ↗

Returns the number of items in the collection. Throws if the collection is not initialized.

()

Source from the content-addressed store, hash-verified

337
338 /** Returns the number of items in the collection. Throws if the collection is not initialized. */
339 count(): number {
340 this.checkInitialized();
341 return this.#items.size;
342 }
343
344 /** Returns true if the collection has no items. Throws if the collection is not initialized. */
345 isEmpty(): boolean {

Callers 2

isEmptyMethod · 0.95
lengthMethod · 0.95

Calls 1

checkInitializedMethod · 0.95

Tested by

no test coverage detected