MCPcopy
hub / github.com/angular/angular / getLengthOrSize

Function getLengthOrSize

packages/forms/signals/src/api/rules/validation/util.ts:36–39  ·  view source on GitHub ↗
(value: ValueWithLengthOrSize)

Source from the content-addressed store, hash-verified

34
35/** Gets the length or size of the given value. */
36export function getLengthOrSize(value: ValueWithLengthOrSize) {
37 const v = value as {length: number; size: number};
38 return typeof v.length === 'number' ? v.length : v.size;
39}
40
41/**
42 * Gets the value for an option that may be either a static value or a logic function that produces

Callers 2

minLengthFunction · 0.90
maxLengthFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…