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

Function toFloat

packages/forms/src/directives/validators.ts:50–52  ·  view source on GitHub ↗

* Method that ensures that provided value is a float (and converts it to float if needed). * * @param value The value to convert to float. * @returns value of parameter converted to number or float.

(value: string | number)

Source from the content-addressed store, hash-verified

48 * @returns value of parameter converted to number or float.
49 */
50function toFloat(value: string | number): number {
51 return typeof value === 'number' ? value : parseFloat(value);
52}
53
54/**
55 * @description

Callers 2

MaxValidatorClass · 0.85
MinValidatorClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected