swc/crates/swc_bundler/tests/.cache/deno/2177309745b4816746b9fee98c1447f965bcbadb.ts
2021-11-09 20:42:49 +09:00

12 lines
305 B
TypeScript

// Loaded from https://deno.land/x/validasaur/src/rules/is_float.ts
import type { Validity } from "../types.ts";
import { invalid } from "../utils.ts";
export function isFloat(value: any): Validity {
if (typeof value !== "number" || value % 1 === 0) {
return invalid("isFloat", { value });
}
}