# airtap-match-browsers

> Match browser manifests to a desired set of browsers

Latest version **1.1.1** (published 2021-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install airtap-match-browsers
pnpm add airtap-match-browsers
yarn add airtap-match-browsers
bun add airtap-match-browsers
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2021-04-24 |
| First published | 2020-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 5 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vincent Weevers |
| Maintainers | vweevers |
| Keywords | airtap, browser, sauce, saucelabs, zuul |

## Links

- npm: https://www.npmjs.com/package/airtap-match-browsers
- Repository: https://github.com/airtap/match-browsers
- Issues: https://github.com/airtap/match-browsers/issues
- npm.io page: https://npm.io/package/airtap-match-browsers

## Dependencies (5)

- [deep-dot](https://npm.io/package/deep-dot.md) 0.0.2
- [deep-equal](https://npm.io/package/deep-equal.md) ^2.0.1
- [is-fork-pr](https://npm.io/package/is-fork-pr.md) ^2.5.0
- [merge-deep](https://npm.io/package/merge-deep.md) ^3.0.2
- [browser-names](https://npm.io/package/browser-names.md) ^1.0.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2021-04-24
- 1.1.0 — 2020-08-16
- 1.0.0 — 2020-08-07
- 0.1.0 — 2020-07-12
- 0.0.2 — 2020-03-27
- 0.0.1 — 2020-03-01

## README

# airtap-match-browsers

> **Match [browser manifests](https://github.com/airtap/browser-manifest) to a desired set of browsers.**  
> Replaces [`sauce-browsers`](https://github.com/lpinca/sauce-browsers) in conjunction with [`airtap-sauce-browsers`](https://github.com/airtap/sauce-browsers).

[![npm status](http://img.shields.io/npm/v/airtap-match-browsers.svg)](https://www.npmjs.org/package/airtap-match-browsers)
[![node](https://img.shields.io/node/v/airtap-match-browsers.svg)](https://www.npmjs.org/package/airtap-match-browsers)
[![Travis](https://img.shields.io/travis/com/airtap/match-browsers.svg)](https://travis-ci.com/airtap/match-browsers)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Usage

```js
const sauce = require('airtap-sauce-browsers').promise
const match = require('airtap-match-browsers')

// Browsers available on Sauce Labs, as manifests
const available = await sauce()

// Browsers that we want, by manifest properties
const wanted = [
  { name: 'firefox', platform: 'linux' },
  { name: 'chrome', version: '78..latest' },
  { name: 'ios safari', version: '13' }
]

// Find matches
const manifests = match(available, wanted)
```

## Properties to match on

### `name`

Required, must be a string. Matched loosely using [`browser-names`](https://github.com/airtap/browser-names).

### `version`

Defaults to "latest". Supported forms (compatible with Zuul & Airtap):

- An exact or partial version ("6" matches "6.0").
- A keyword, one of "oldest" (first version) or "latest" (last stable version).
- A range in the form of `<start>..<end>`, where `start` and `end` are either a version or a keyword. This will result in one or more matches.
- A negative range in the form of `-<n>..latest`, for example `-1..latest` which means the last 2 stable versions.
- A prerelease version like "dev", "beta", "80.0a1". Such versions sort after stable versions, so that `oldest..latest` excludes "dev" and `latest..dev` includes e.g. latest, "beta" and "dev".
- An array of versions.

If a manifest doesn't have a `version`, it behaves like a prerelease.

### `platform` and any other (nested) property

Yet to document. A quick example:

```js
const manifests = match(available, [{
  name: 'chrome for android',
  version: '10',
  capabilities: {
    appium: {
      // Select a specific emulator (case-insensitive)
      deviceName: 'google pixel 3a googleapi emulator'
    }
  }
}])
```

## Specifying options

Yet to document.

## Deduplication logic

Yet to document.

## Install

With [npm](https://npmjs.org) do:

```
npm install airtap-match-browsers
```

## License

[MIT](LICENSE.md) © 2020-present Vincent Weevers

---
_Source: https://npm.io/package/airtap-match-browsers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
