Return true if the given value is a number that is not an integer.
isFloat(0); // => falseisFloat(0.1); // => true
npx atmx add helper is-float
Copy and paste the following method into @/utils/helpers/undefined.ts:
@/utils/helpers/undefined.ts
import { isNumber } from "@/helpers/is-number.ts"; /*** Return true if the given value is a number that is not an integer.** @example* isFloat(0) // => false* isFloat(0.1) // => true*/export function isFloat(value: any): value is number {return isNumber(value) && value % 1 !== 0;}