Skip to main content
Module

std/semver/mod.ts>valid

Deno standard library
Go to Latest
function valid
Deprecated
Deprecated

(will be removed after 0.200.0) Use parse() or tryParse() instead

A compatibility function which checks that a string is a valid semver

import { valid } from "https://deno.land/std@0.200.0/semver/mod.ts";

Parameters

value: string | SemVer | null

A string which may or may not contain a valid SemVer

Returns

string | null

A valid SemVer or undefined