array of version strings
Optional
optionsOrLoose: boolean | Optionsan options object { loose }
(where loose is the only available option) or a boolean indicating whether to enable loose mode. In loose mode, the parser is more forgiving with imperfectly formatted semver strings
the sorted array
Sorts an array of version strings in descending order using
compareBuild()
(the whole version including build identifier ([+BUILD]
) taken into account).Example