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

std/semver/mod.ts>prerelease

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

Returns an array of prerelease components, or null if none exist.

Examples

prerelease("1.2.3-alpha.1") -> ["alpha", 1]

Parameters

version: string | SemVer
optional
options: Options

Returns

ReadonlyArray<string | number> | null