MCPcopy Create free account
hub / github.com/ArrowM/Queue-Bot / size

Function size

src/utils/misc.utils.ts:14–16  ·  view source on GitHub ↗
(items: ArrayOrCollection<any, T>)

Source from the content-addressed store, hash-verified

12}
13
14export function size<T>(items: ArrayOrCollection<any, T>): number {
15 return ((items instanceof Collection) ? items?.size : items?.length) ?? 0;
16}
17
18export function map<T, S>(items: ArrayOrCollection<any, T>, fn: (queue: T) => S): S[] {
19 return (items instanceof Collection) ? items.map(fn) : items.map(fn);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected