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

14 lines
391 B
TypeScript

// Loaded from https://deno.land/x/validasaur/src/rules/min_number.ts
import type { Validity, Rule } from "../types.ts";
import { invalid } from "../utils.ts";
export function minNumber(minValue: number): Rule {
return function minRule(value: any): Validity {
if (typeof value !== "number" || value < minValue) {
return invalid("minNumber", { value, minValue });
}
};
}