Module

std/semver/mod.ts>prerelease

Deno standard library
Go to Latest
function prerelease
import { prerelease } from "https://dotland.deno.dev/std@0.181.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