Skip to main content
Version: 24.38.0

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

范围

🌐 Parameter

类型

🌐 Type

描述

🌐 Description

browser

浏览器

返回:

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