MCPcopy
hub / github.com/angular/angular / last

Function last

packages/router/src/utils/collection.ts:69–71  ·  view source on GitHub ↗
(a: readonly T[])

Source from the content-addressed store, hash-verified

67 * Return the last element of an array.
68 */
69export function last<T>(a: readonly T[]): T | null {
70 return a.length > 0 ? a[a.length - 1] : null;
71}
72
73export function wrapIntoObservable<T>(value: T | Promise<T> | Observable<T>): Observable<T> {
74 if (isObservable(value)) {

Callers 5

constructorMethod · 0.90
runSeriallyFunction · 0.50

Calls

no outgoing calls

Tested by 1

runSeriallyFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…