Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

airtap-multi

Package Overview
Dependencies
4
Maintainers
1
Versions
1
Issues
File Explorer

Advanced tools

airtap-multi

Use multiple browser providers as one

    1.0.0latest
    GitHub

Version published
Maintainers
1
Weekly downloads
484
decreased by-45.06%

Weekly downloads

Readme

Source

airtap-multi

Use multiple browser providers as one.

npm status node Travis build status JavaScript Style Guide

Usage

const Multi = require('airtap-multi') const multi = new Multi() multi.add('airtap-playwright') multi.add('airtap-sauce') // Get manifests with name 'firefox' const manifests = await multi.manifests([{ name: 'firefox' }]) // Only from the airtap-sauce provider const manifests = await multi.manifests([{ name: 'firefox', provider: 'airtap-sauce' }]) // Instantiate a browser (see browser-provider for details) const browser = multi.browser(manifest, target)

API

multi = new Multi()

Implements the browser-provider interface with a few additional methods.

multi.add(id[, options])

Add a provider that's been installed in a nearby node_modules. The optional options object will be passed to the provider's constructor.

multi.add(object[, options])

Add multiple providers in the form of { [id]: options }:

multi.add({ 'airtap-sauce': { username: 'example', key: 'secret' } })

If the second options argument is provided, those options will be deeply merged into the options of each provider.

multi.add(fn[, options])

Add a provider as a constructor function.

multi.add(array[, options])

Add multiple providers using an array, where each array element is of the above types (string, object or function).

provider = multi.get(id)

Get an added provider by its id.

iterator = multi[Symbol.iterator]()

for (const [id, provider] of multi) { // .. }

iterator = multi.keys()

for (const id of multi.keys()) { // .. }

iterator = multi.values()

for (const provider of multi.values()) { // .. }

Install

With npm do:

npm install airtap-multi

License

MIT © 2020-present Airtap contributors

Keywords

FAQs

Last updated on 07 Aug 2020

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc