MCPcopy Index your code
hub / github.com/angular/angular / pureFunction2Internal

Function pureFunction2Internal

packages/core/src/render3/pure_function.ts:366–383  ·  view source on GitHub ↗
(
  lView: LView,
  bindingRoot: number,
  slotOffset: number,
  pureFn: (v1: any, v2: any) => any,
  exp1: any,
  exp2: any,
  thisArg?: any,
)

Source from the content-addressed store, hash-verified

364 * @returns Updated or cached value
365 */
366export function pureFunction2Internal(
367 lView: LView,
368 bindingRoot: number,
369 slotOffset: number,
370 pureFn: (v1: any, v2: any) => any,
371 exp1: any,
372 exp2: any,
373 thisArg?: any,
374): any {
375 const bindingIndex = bindingRoot + slotOffset;
376 return bindingUpdated2(lView, bindingIndex, exp1, exp2)
377 ? updateBinding(
378 lView,
379 bindingIndex + 2,
380 thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2),
381 )
382 : getPureFunctionReturnValue(lView, bindingIndex + 2);
383}
384
385/**
386 * If the value of any provided exp has changed, calls the pure function to return

Callers 2

ɵɵpipeBind2Function · 0.90
ɵɵpureFunction2Function · 0.85

Calls 3

bindingUpdated2Function · 0.90
updateBindingFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…