Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno_class_validator/src/index.ts>isIP

Decorator-based property validation for classes.
Latest
function isIP
import { isIP } from "https://deno.land/x/deno_class_validator@v1.0.0/src/index.ts";

Checks if the string is an IP (version 4 or 6). If given value is not a string, then it returns false.

Parameters

value: unknown
optional
version: IsIpVersion

Returns

boolean