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

13 lines
342 B
TypeScript

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