puppeteer/website/versioned_docs/version-22.4.1/browsers-api/browsers.getversioncomparator.md

26 lines
568 B
Markdown
Raw Normal View History

---
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
| Parameter | Type | Description |
| --------- | -------------------------------- | ----------- |
| browser | [Browser](./browsers.browser.md) | |
**Returns:**
(a: string, b: string) => number