Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/semver/try_parse.ts>tryParse

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function tryParse
import { tryParse } from "https://deno.land/std@0.199.0/semver/try_parse.ts";

Returns the parsed version, or undefined if it's not valid.

Parameters

optional
version: string

The version string to parse

Returns

SemVer | undefined

A valid SemVer or undefined