
Co-authored-by: AkaraChen <akarachen@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: kurokobo <kuro664@gmail.com> Co-authored-by: Hiroshi Fujita <fujita-h@users.noreply.github.com>
10 lines
225 B
TypeScript
10 lines
225 B
TypeScript
import semver from 'semver'
|
|
|
|
export const getLatestVersion = (versionList: string[]) => {
|
|
return semver.rsort(versionList)[0]
|
|
}
|
|
|
|
export const compareVersion = (v1: string, v2: string) => {
|
|
return semver.compare(v1, v2)
|
|
}
|