MCPcopy Create free account
hub / github.com/angular/angular / wrapEqualityFn

Function wrapEqualityFn

packages/core/src/resource/resource.ts:577–579  ·  view source on GitHub ↗

* Wraps an equality function to handle either value being `undefined`.

(equal: ValueEqualityFn<T>)

Source from the content-addressed store, hash-verified

575 * Wraps an equality function to handle either value being `undefined`.
576 */
577function wrapEqualityFn<T>(equal: ValueEqualityFn<T>): ValueEqualityFn<T | undefined> {
578 return (a, b) => (a === undefined || b === undefined ? a === b : equal(a, b));
579}
580
581function createLoader<T, R>(
582 options: PromiseResourceOptions<T, R> & {debugName?: string},

Callers 1

resourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected