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

std/semver/mod.ts>parse

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

Attempt to parse a string as a semantic version, returning either a SemVer object or throws a TypeError.

Parameters

version: string | SemVer

The version string to parse

Returns

A valid SemVer

Parameters

version: string | SemVer | null
optional
options: { includePrerelease: boolean; }