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

Function formatNumber

packages/common/src/i18n/format_number.ts:270–281  ·  view source on GitHub ↗
(value: number, locale: string, digitsInfo?: string)

Source from the content-addressed store, hash-verified

268 * @publicApi
269 */
270export function formatNumber(value: number, locale: string, digitsInfo?: string): string {
271 const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);
272 const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
273 return formatNumberToLocaleString(
274 value,
275 pattern,
276 locale,
277 NumberSymbol.Group,
278 NumberSymbol.Decimal,
279 digitsInfo,
280 );
281}
282
283interface ParsedNumberFormat {
284 minInt: number;

Callers 2

transformMethod · 0.90

Calls 4

getLocaleNumberFormatFunction · 0.90
getLocaleNumberSymbolFunction · 0.90
parseNumberFormatFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…