2024-02-22 08:09:03 +00:00
|
|
|
---
|
|
|
|
sidebar_label: getVersionComparator
|
|
|
|
---
|
|
|
|
|
|
|
|
# getVersionComparator() function
|
|
|
|
|
|
|
|
Returns a version comparator for the given browser that can be used to sort browser versions.
|
|
|
|
|
|
|
|
#### Signature:
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
export declare function getVersionComparator(
|
|
|
|
browser: Browser
|
|
|
|
): (a: string, b: string) => number;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2024-03-25 13:03:57 +00:00
|
|
|
<table><thead><tr><th>
|
2024-02-22 08:09:03 +00:00
|
|
|
|
2024-03-25 13:03:57 +00:00
|
|
|
Parameter
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Type
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
|
|
|
</th></tr></thead>
|
|
|
|
<tbody><tr><td>
|
|
|
|
|
|
|
|
browser
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
[Browser](./browsers.browser.md)
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</tbody></table>
|
2024-02-22 08:09:03 +00:00
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
(a: string, b: string) => number
|