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

Function toMaskBit

packages/core/src/render3/i18n/i18n_parse.ts:510–512  ·  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

508 * case is that we will execute binding code more often than necessary. (penalty of performance)
509 */
510function toMaskBit(bindingIndex: number): number {
511 return 1 << Math.min(bindingIndex, 31);
512}
513
514/**
515 * 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