query
On this page

major

lib.versions.major

Docs pulled from | This Revision | 10 minutes ago


Get the major version string from a string.

Inputs

v

1. Function argument

Examples

major usage example

major "1.2.3"
=> "1"

Noogle detected

Implementation

The following is the current implementation of this function.

major = v: builtins.elemAt (splitVersion v) 0;