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

Function parseIntAutoRadix

packages/common/src/i18n/format_number.ts:544–553  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

542}
543
544export function parseIntAutoRadix(text: string): number {
545 const result: number = parseInt(text);
546 if (isNaN(result)) {
547 throw new RuntimeError(
548 RuntimeErrorCode.INVALID_INTEGER_LITERAL,
549 ngDevMode && 'Invalid integer literal when parsing ' + text,
550 );
551 }
552 return result;
553}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected