open-index/open-npm huggingface dataset:
npm package: @luminati-io/snappystream
Description: Framed Snappy streams
Author: Dudley Carr
Latest version: 2.0.0-lum.1

# snappystream

A Node.js library for supporting the
[Snappy](https://code.google.com/p/snappy/) framing format via streams. See
the [Snappy Framing Format
Description](https://github.com/google/snappy/blob/master/framing_format.txt) for
details.

Usage:
SnappyStream and UnsnappyStream are
[Transform streams](http://nodejs.org/api/stream.html#stream_class_stream_transform).

```javascript
const {SnappyStream} = require('snappystream')
const fs = require('fs')

const inStream = fs.createReadStream('snappy.txt')
const snappyStream = new SnappyStream()
const outStream = fs.createWriteStream('snappy_frame.txt')

inStream.pipe(snappyStream).pipe(outStream)
```

UnsnappyStream constructor takes an optional argument `verifyChecksums`
which is false by default.

```javascript
const {UnsnappyStream} = require('snappysteam')
const fs = require('fs')

const inStream = fs.createReadStream('snappy_frame.txt')
const unsnappyStream = new UnsnappyStream(true)

unsnappyStream.on('end', function () {
  console.log(unsnappyStream.read())
})

inStream.pipe(unsnappyStream)
```
npm package: @luminati-io/test-utils
Description: Test utils for jimp extensions.
Latest version: 0.16.1-lum.3

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/utils</h1>
  <p>Utils for jimp extensions.</p>
</div>

## Available Methods

### isNodePattern

Determines if function was passed an node callback.

```js
if (isNodePattern(cb)) {
  cb.call(this, null, this);
}
```

### throwError

Either throws the error or calls the callback with the error.

```js
if (/* check for error */) {
  return throwError.call(this, 'someError', cb);
}
```

### scan

Scans through a region of the bitmap, calling a function for each pixel.

```js
function removeRed(image) {
  return scan(image, 0, 0, image.bitmap.width, image.bitmap.height, function(
    x,
    y,
    index
  ) {
    const red = this.bitmap.data[index + 0];
    const green = this.bitmap.data[index + 1];
    const blue = this.bitmap.data[index + 2];
    const alpha = this.bitmap.data[index + 3];

    this.bitmap.data[index + 0] = 0;
    this.bitmap.data[index + 1] = green;
    this.bitmap.data[index + 2] = blue;
    this.bitmap.data[index + 3] = alpha;
  });
}
```
npm package: @luminati-io/tiff
Description: Default Jimp tiff encoder/decoder.
Latest version: 0.16.1-lum.3

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/tiff</h1>
  <p>Default Jimp tiff encoder/decoder.</p>
</div>
npm package: @luminati-io/types
Description: Default Jimp encoder/decoders.
Latest version: 0.16.1-lum.3

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/types</h1>
  <p>Default Jimp types.</p>
</div>

## Supported Image Types

- [bmp](../type-bmp)
- [gif](../type-gif)
- [jpeg](../type-jpeg)
- [png](../type-png)
- [tiff](../type-tiff)
npm package: @luminati-io/unlisten
Description: Temporarily stop accepting connections on a TCP or HTTP(S) server
Author: Alexey Feldgendler
Latest version: 1.0.2-lum.0

# unlisten

```js
const unlisten = require('unlisten');
```

Node.js module: Temporarily stop accepting connections on a TCP or HTTP(S) server.

## Introduction

Once you get a `net.Server`, `http.Server` or `https.Server` in Node.js to
start listening on a port, they will automatically accept every connection that
comes their way. Node.js doesn't let you stop accepting temporarily without
tearing down the whole server (which involves closing the listening socket).

Why would you want to stop accepting?

If you're using `cluster.SCHED_NONE` instead of the default `cluster.SCHED_RR`
as Node.js' [scheduling policy](https://nodejs.org/api/cluster.html#cluster_cluster_schedulingpolicy),
your workers share the listening socket. When a new connection comes, all
workers that are currently blocked in `epoll_wait` wake up and race to accept
it; if none is in `epoll_wait`, the next one to call `epoll_wait` gets it. This
naturally excludes workers that are very busy. Still, other workers can bite more
than they can chew, especially given that the way the kernel seems to work, the
same worker tends to win the race every time.

So if the workers have some kind of safeguard against overload, such as the
[toobusy-js](https://www.npmjs.com/package/toobusy-js) module, they can do
better than just denying service: using the `unlisten` module, a worker can
temporarily stop participating in the accept race and let other, less busy
workers help out.

## Usage

To make an instance of `net.Server`, `http.Server` or `https.Server` stop
accepting connections:

```js
unlisten.pause(server);
```

To resume accepting:

```js
unlisten.resume(server);
```

The calls are idempotent (that means, calling `pause` or `resume` the second
time in a row on the same server does nothing).

This is only for listening servers! Don't try it on sockets that represent
established connections rather than servers, or on servers that haven't started
listening or have been closed.

## Limitations

* This module only works (and compiles) on Linux.
* In Node.js cluster workers, it requires `cluster.SCHED_NONE`.
* It fiddles with the `libuv` internals, and might stop working with future
  versions of Node.js. PRs to keep it compatible are welcome.
* The server instance must have already started listening.
npm package: @luminati-io/utils
Description: Utils for jimp extensions.
Latest version: 0.16.1-lum.3

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/utils</h1>
  <p>Utils for jimp extensions.</p>
</div>

## Available Methods

### isNodePattern

Determines if function was passed an node callback.

```js
if (isNodePattern(cb)) {
  cb.call(this, null, this);
}
```

### throwError

Either throws the error or calls the callback with the error.

```js
if (/* check for error */) {
  return throwError.call(this, 'someError', cb);
}
```

### scan

Scans through a region of the bitmap, calling a function for each pixel.

```js
function removeRed(image) {
  return scan(image, 0, 0, image.bitmap.width, image.bitmap.height, function(
    x,
    y,
    index
  ) {
    const red = this.bitmap.data[index + 0];
    const green = this.bitmap.data[index + 1];
    const blue = this.bitmap.data[index + 2];
    const alpha = this.bitmap.data[index + 3];

    this.bitmap.data[index + 0] = 0;
    this.bitmap.data[index + 1] = green;
    this.bitmap.data[index + 2] = blue;
    this.bitmap.data[index + 3] = alpha;
  });
}
```

### scanIterator

It's possible to make an iterator scan with a `for ... of`, if you want to `break` the scan before it reaches the end, but note, that this iterator has a huge performance implication:

```js
for (const { x, y, idx, image } of scanIterator(
  image,
  0,
  0,
  image.bitmap.width,
  image.bitmap.height
)) {
}
```
npm package: @luminati-io/webdriverio8
Description: Next-gen browser and mobile automation test framework for Node.js
Author: Christian Bromann
Latest version: 8.26.1-lum.14

WebdriverIO
===========

> Next-gen browser and mobile automation test framework for Node.js

This package provides an easy-to-manage API and a lot of syntactical sugar on top of the WebDriver specification. You can use WebdriverIO as a standalone package or via a test runner using [`@wdio/cli`](https://webdriver.io/docs/clioptions). WebdriverIO allows you to run tests locally using the WebDriver or Chrome DevTools protocol as well as remote user agents using cloud providers like [Sauce Labs](https://saucelabs.com/).

## Installation

You can install WebdriverIO via NPM:

```sh
npm install webdriverio
```

## Usage

WebdriverIO by default uses Puppeteer to automate a browser like Chrome, Firefox or Chromium Edge. So if you have Chrome installed, the following script should start a browser for you and get the title of the page:

```js
import { remote } from 'webdriverio'

let browser

;(async () => {
    browser = await remote({
        capabilities: { browserName: 'chrome' }
    })

    await browser.navigateTo('https://www.google.com/ncr')

    const searchInput = await browser.$('#lst-ib')
    await searchInput.setValue('WebdriverIO')

    const searchBtn = await browser.$('input[value="Google Search"]')
    await searchBtn.click()

    console.log(await browser.getTitle()) // outputs "WebdriverIO - Google Search"

    await browser.deleteSession()
})().catch((err) => {
    console.error(err)
    return browser.deleteSession()
})
```

See the raw [protocol example](https://www.npmjs.com/package/webdriver#example) using the `webdriver` package to get a glance at the differences.

For more information on [options](https://webdriver.io/docs/options#webdriver-options), [multiremote usage](https://webdriver.io/docs/multiremote) or integration into [cloud services](https://webdriver.io/docs/cloudservices) please check out the [docs](https://webdriver.io/docs/gettingstarted).
npm package: @luminati-io/webdriverio8-protocols
Description: Utility package providing information about automation protocols
Author: Christian Bromann
Latest version: 8.24.12-lum.5

WebdriverIO Protocol Helper
===========================

This package stores the definition for various automation protocols such as [WebDriver](https://w3c.github.io/webdriver/) or vendor specific protocol extensions like for [SauceLabs](https://saucelabs.com/). Unless you are interested in generating a WebDriver client there should be no reason why you should need this package. This package holds the definition of the following protocols:

- [WebDriver](https://w3c.github.io/webdriver/)
- [JSON Wire Protocol](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol)
- [Appium](http://appium.io/)
- [Mobile JSON Wire Protocol](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)
- [Sauce Labs](https://saucelabs.com/)
- Chrome (WebDriver extension when running Chromedriver)
- Selenium (when running Selenium Standalone Server)

## Install

To install the package, run:

```sh
npm install @wdio/protocols
```

## Usage

You can get data by importing the package as follows:

```js
import { WebDriverProtocol, MJsonWProtocol, JsonWProtocol, AppiumProtocol, ChromiumProtocol, SauceLabsProtocol, SeleniumProtocol } from '@wdio/protocols'

/**
 * get description of session command
 */
console.log(WebDriverProtocol['/session'].POST.description)
```

## TypeScript Interfaces

The package exposes TypeScript interfaces for all protocols. You can use them for your own project as follows:

```ts
import type { WebDriverCommands } from '@wdio/protocol'

import { WebDriverCommands, WebDriverCommandsAsync } from './src'

const browser = {} as WebDriverCommands
browser.sendAlertText(true)
// fails with "Argument of type 'boolean' is not assignable to parameter of type 'string'.ts(2345)"

const asyncBrowser = {} as WebDriverCommandsAsync
const a = await asyncBrowser.getTitle()
type foo = typeof a // string
```

----

For more information on WebdriverIO see the [homepage](https://webdriver.io).