Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno_class_validator/src/index.ts>isHash

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

Check if the string is a hash of type algorithm. Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b']

Parameters

value: unknown
algorithm: ValidatorJS.HashAlgorithm

Returns

boolean