Skip to main content
Version: 23.10.1

getVersionComparator() 函数

¥getVersionComparator() function

返回给定浏览器的版本比较器,可用于对浏览器版本进行排序。

¥Returns a version comparator for the given browser that can be used to sort browser versions.

签名

¥Signature

export declare function getVersionComparator(
browser: Browser,
): (a: string, b: string) => number;

参数

¥Parameters

范围

类型

描述

browser

Browser

Returns:

(a: string, b: string) => number