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

Function parseIntAutoRadix

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

Source from the content-addressed store, hash-verified

533}
534
535export function parseIntAutoRadix(text: string): number {
536 const result: number = parseInt(text);
537 if (isNaN(result)) {
538 throw new RuntimeError(
539 RuntimeErrorCode.INVALID_INTEGER_LITERAL,
540 ngDevMode && 'Invalid integer literal when parsing ' + text,
541 );
542 }
543 return result;
544}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected