MCPcopy
hub / github.com/angular/angular / toMaskBit

Function toMaskBit

packages/core/src/render3/i18n/i18n_parse.ts:497–499  ·  view source on GitHub ↗

* Convert binding index to mask bit. * * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to * have more than 32 bindings this will be hit very rarely. The dow

(bindingIndex: number)

Source from the content-addressed store, hash-verified

495 * case is that we will execute binding code more often than necessary. (penalty of performance)
496 */
497function toMaskBit(bindingIndex: number): number {
498 return 1 << Math.min(bindingIndex, 31);
499}
500
501/**
502 * Removes everything inside the sub-templates of a message.

Callers 2

addUpdateIcuSwitchFunction · 0.85

Calls 1

minMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…