open-index/open-npm huggingface dataset:
npm package: @segment/analytics-consent-tools
Description: ## Quick Start
Latest version: 2.0.3

# @segment/analytics-consent-tools

## Quick Start

```ts
// wrapper.js
import { createWrapper, resolveWhen } from '@segment/analytics-consent-tools'

export const withCMP = createWrapper({
  // Wait to load wrapper or call "shouldLoadSegment" until window.CMP exists.
  shouldLoadWrapper: async () => {
    await resolveWhen(() => window.CMP !== undefined, 500)
  },

  // Allow for control over wrapper + analytics initialization.
  // Delay any calls to analytics.load() until this function returns / resolves.
  shouldLoadSegment: async (ctx) => {
    /*
    // Optional -- for granular control of initialization
    if (noConsentNeeded) {
      ctx.abort({ loadSegmentNormally: true })
    } else if (allTrackingDisabled) {
      ctx.abort({ loadSegmentNormally: false })
    }
    */
    if (window.CMP.ConsentModel === 'opt-out') {
      return ctx.load({ consentModel: 'opt-out' })
    } else {
      await resolveWhen(
        () => !window.CMP.popUpVisible() && window.CMP.categories.length,
        500
      )
      return ctx.load({ consentModel: 'opt-in' })
    }
  },

  getCategories: () => {
    return normalizeCategories(window.CMP.consentedCategories()) // Expected format: { foo: true, bar: false }
  },

  registerOnConsentChanged: (setCategories) => {
    window.CMP.onConsentChanged((event) => {
      setCategories(normalizeCategories(event.detail))
    })
  },
})
```

### Settings / Configuration

See: [settings.ts](src/types/settings.ts)

### Consent Models

The wrapper has different behavior based on the consent-model:

- **opt-in** - (strict, GDPR scenario) -- Unconsented device mode destinations are removed
- **opt-out** - Device mode destinations are loaded, but with blocking middleware

## Wrapper Usage API

## `npm`

```js
import { withCMP } from './wrapper'
import { AnalyticsBrowser } from '@segment/analytics-next'

export const analytics = new AnalyticsBrowser()

withCMP(analytics).load({
  writeKey: '<MY_WRITE_KEY'>
})

```

## Snippet users (window.analytics)

### Note: This assumes a project that can consume the library via es6 imports, using a like Webpack.

1. Delete the `analytics.load()` line from the snippet

```diff
- analytics.load("<MY_WRITE_KEY>");
```

2. Import Analytics

```js
import { withCMP } from './wrapper'

withCMP(window.analytics).load('<MY_WRITE_KEY')
```

## Wrapper Examples

- [OneTrust](../consent-wrapper-onetrust) 
- [TrustArc](https://github.com/trustarc/trustarc-segment-wrapper)

## Settings / Options / Configuration

See the complete list of settings in the **[Settings interface](src/types/settings.ts)**

## Special Requirements

- For npm users, this library expects a version of `@segment/analytics-next` >= **1.53.1**. Note: If your library depends on this library, you should have the appropriate peer dependency declaration. See our `package.json` for an example.

## Development

1. Build this package + all dependencies

```sh
yarn . build
```

2. Run tests

```
yarn test
```
npm package: @segment/analytics-core
Description: This package represents core 'shared' functionality that is shared by analytics packages. This is not designed to be used directly, but internal to analytics-node and analytics-browser.
Latest version: 1.8.2

# @segment/analytics-core

This package represents core 'shared' functionality that is shared by analytics packages. This is not designed to be used directly, but internal to analytics-node and analytics-browser.
npm package: @segment/analytics-generic-utils
Description: This monorepo's version of "lodash". This package contains shared generic utilities that can be used within the ecosystem. This package should not have dependencies, and should not contain any references to the Analytics domain.
Latest version: 1.2.0

# @segment/analytics-generic-utils

This monorepo's version of "lodash". This package contains shared generic utilities that can be used within the ecosystem. This package should not have dependencies, and should not contain any references to the Analytics domain.
npm package: @segment/analytics-node
Description: https://www.npmjs.com/package/@segment/analytics-node
Latest version: 3.0.0

# @segment/analytics-node

https://www.npmjs.com/package/@segment/analytics-node

### OFFICIAL DOCUMENTATION (FULL)
- https://segment.com/docs/connections/sources/catalog/libraries/server/node

### LEGACY NODE SDK MIGRATION GUIDE:
- https://segment.com/docs/connections/sources/catalog/libraries/server/node/migration


## Runtime Support
- Node.js >= 20
- AWS Lambda
- Cloudflare Workers
- Vercel Edge Functions
- Web Workers / Browser (no device mode destination support)

## Quick Start
### Install library
```bash
# npm
npm install @segment/analytics-node
# yarn
yarn add @segment/analytics-node
# pnpm
pnpm install @segment/analytics-node
```

### Usage
Assuming some express-like web framework.
```ts
import { Analytics } from '@segment/analytics-node'
// or, if you use require:
const { Analytics } = require('@segment/analytics-node')

// instantiation
const analytics = new Analytics({ writeKey: '<MY_WRITE_KEY>' })

app.post('/login', (req, res) => {
   analytics.identify({
      userId: req.body.userId,
      previousId: req.body.previousId
  })
  res.sendStatus(200)
})

app.post('/cart', (req, res) => {
  analytics.track({
    userId: req.body.userId,
    event: 'Add to cart',
    properties: { productId: '123456' }
  })
   res.sendStatus(201)
});
```
See our [official documentation](https://segment.com/docs/connections/sources/catalog/libraries/server/node) for more examples and information.


## Settings & Configuration
See the documentation: https://segment.com/docs/connections/sources/catalog/libraries/server/node/#configuration

You can also see the complete list of settings in the [AnalyticsSettings interface](src/app/settings.ts).
npm package: @segment/analytics-react-native-plugin-adjust
Description: The hassle-free way to add Segment analytics to your React-Native app.
Author: Segment
Latest version: 0.8.0

# @segment/analytics-react-native-plugin-adjust

`DestinationPlugin` for [Adjust](http://adjust.com/). Wraps [`react-native-adjust`](https://github.com/adjust/react_native_sdk).


## Installation

You need to install the `@segment/analytics-react-native-plugin-adjust` and the `react-native-adjust` dependency.

Using NPM:
```bash
npm install --save @segment/analytics-react-native-plugin-adjust react-native-adjust
```

Using Yarn:
```bash
yarn add @segment/analytics-react-native-plugin-adjust react-native-adjust
```

Run `pod install` after the installation to autolink the Adjust SDK.

See [React Native SDK of Adjust](https://github.com/adjust/react_native_sdk) for more details of this dependency.
## Usage

Follow the [instructions for adding plugins](https://github.com/segmentio/analytics-react-native#adding-plugins) on the main Analytics client:

In your code where you initialize the analytics client call the `.add(plugin)` method with an `AdjustPlugin` instance:

```ts
import { createClient } from '@segment/analytics-react-native';

import { AdjustPlugin } from '@segment/analytics-react-native-plugin-adjust';

const segmentClient = createClient({
  writeKey: 'SEGMENT_KEY'
});

segmentClient.add({ plugin: new AdjustPlugin() });
```

## Support

Please use Github issues, Pull Requests, or feel free to reach out to our [support team](https://segment.com/help/).

## Integrating with Segment

Interested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.

## License
```
MIT License

Copyright (c) 2021 Segment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
npm package: @segment/analytics-react-native-plugin-advertising-id
Description: The hassle-free way to add Segment analytics to your React-Native app.
Author: Segment
Latest version: 1.3.6

# @segment/analytics-react-native-plugin-advertising-id

`EnrichmentPlugin` to collect advertisingId on Android

## Installation

Add the package

```sh
yarn add @segment/analytics-react-native-plugin-advertising-id
```

This plugin requires a `compileSdkVersion` of at least 19. 

## Usage

Follow the instructions for adding plugins on the main Analytics client:

In your code where you initialize the Analytics client call the `.add(plugin)` method with an `AdvertisingId` instance

```js
import { createClient } from '@segment/analytics-react-native';
import { AdvertisingIdPlugin } from '@segment/analytics-react-native-plugin-advertising-id';

const segmentClient = createClient({
  writeKey: 'SEGMENT_KEY'
});

//...

segmentClient.add({ plugin: new AdvertisingIdPlugin() });
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT
npm package: @segment/analytics-react-native-plugin-amplitude-session
Description: The hassle-free way to add Segment analytics to your React-Native app.
Author: Segment
Latest version: 0.4.2

# @segment/analytics-react-native-plugin-amplitude

`DestinationPlugin` for [Amplitude](https://www.amplitude.com/) sessions. This plugin makes it possible to track session info and send it to Amplitude via a Cloud Mode conenction.

## Installation

Using NPM:

```bash
npm install --save @segment/analytics-react-native-plugin-amplitude-session
```

Using Yarn:

```bash
yarn add @segment/analytics-react-native-plugin-amplitude-session
```

## Usage

Follow the [instructions for adding plugins](https://github.com/segmentio/analytics-react-native#adding-plugins) on the main Analytics client:

In your code where you initialize the analytics client call the `.add(plugin)` method with an `AmplitudeSessionPlugin` instance:

```ts
import { createClient } from '@segment/analytics-react-native';

import { AmplitudeSessionPlugin } from '@segment/analytics-react-native-plugin-amplitude-session';

const segmentClient = createClient({
  writeKey: 'SEGMENT_KEY',
});

segmentClient.add({ plugin: new AmplitudeSessionPlugin() });
```

## Support

Please use Github issues, Pull Requests, or feel free to reach out to our [support team](https://segment.com/help/).

## Integrating with Segment

Interested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.

## License

```
MIT License

Copyright (c) 2021 Segment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
npm package: @segment/analytics-react-native-plugin-branch
Description: The hassle-free way to add Segment analytics to your React-Native app.
Author: Segment
Latest version: 1.1.2

# @segment/analytics-react-native-plugin-branch

`DestinationPlugin` for [Branch](https://branch.io/). Wraps [`react-native-branch`](https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution).

## Installation

You need to install the `@segment/analytics-react-native-plugin-branch` and the `react-native-branch` dependency.

Using NPM:
```bash
npm install --save @segment/analytics-react-native-plugin-branch react-native-branch
```

Using Yarn:
```bash
yarn add @segment/analytics-react-native-plugin-branch react-native-branch
```

Run `pod install` after the installation to autolink the Branch SDK.

See [`Branch React Native SDK`](https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution) for more details of this dependency.
## Usage

Follow the [instructions for adding plugins](https://github.com/segmentio/analytics-react-native#adding-plugins) on the main Analytics client:

In your code where you initialize the analytics client call the `.add(plugin)` method with an `BranchPlugin` instance:

```ts
import { createClient } from '@segment/analytics-react-native';

import { BranchPlugin } from '@segment/analytics-react-native-plugin-branch';

const segmentClient = createClient({
  writeKey: 'SEGMENT_KEY'
});

segmentClient.add({ plugin: new BranchPlugin() });
```

## Support

Please use Github issues, Pull Requests, or feel free to reach out to our [support team](https://segment.com/help/).

## Integrating with Segment

Interested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.

## License
```
MIT License

Copyright (c) 2022 Segment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
npm package: @segment/analytics-react-native-plugin-braze
Description: The hassle-free way to add Segment analytics to your React-Native app.
Author: Segment
Latest version: 0.9.0

# @segment/analytics-react-native-plugin-braze

`DestinationPlugin` for [Braze](https://www.braze.com). Wraps [`@braze/react-native-sdk`](https://github.com/Appboy/appboy-react-sdk). This Plugin should be used with a [Device Mode](https://segment.com/docs/connections/destinations/#connection-modes) connection to Braze. To connect to Braze with a Cloud Mode connection use the [Braze Middleware Plugin]((https://www.npmjs.com/package/@segment/analytics-react-native-plugin-braze))instead. It is not possible to use both plugins in one `Analytics React Native` instance. 

## Installation

You need to install the `@segment/analytics-react-native-plugin-braze` and the `@braze/react-native-sdk` dependency.

Using NPM:
```bash
npm install --save @segment/analytics-react-native-plugin-braze @braze/react-native-sdk
```

Using Yarn:
```bash
yarn add @segment/analytics-react-native-plugin-braze @braze/react-native-sdk
```

Run `pod install` after the installation to autolink the Braze SDK.

See [Braze React SDK](https://github.com/Appboy/appboy-react-sdk) for more details of this dependency.

## Usage

Follow the [instructions for adding plugins](https://github.com/segmentio/analytics-react-native#adding-plugins) on the main Analytics client:

In your code where you initialize the analytics client call the `.add(plugin)` method with an `BrazePlugin` instance:

```ts
import { createClient } from '@segment/analytics-react-native';

import { BrazePlugin } from '@segment/analytics-react-native-plugin-braze';

const segmentClient = createClient({
  writeKey: 'SEGMENT_KEY'
});

segmentClient.add({ plugin: new BrazePlugin() });
```

## Support

Please use Github issues, Pull Requests, or feel free to reach out to our [support team](https://segment.com/help/).

## Integrating with Segment

Interested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.

## License
```
MIT License

Copyright (c) 2021 Segment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
npm package: @segment/analytics-react-native-plugin-firebase
Description: The hassle-free way to add Segment analytics to your React-Native app.
Author: Segment
Latest version: 1.0.0

# @segment/analytics-react-native-plugin-firebase

`DestinationPlugin` for [Firebase](https://firebase.google.com). Wraps [`react-native-firebase`](https://github.com/invertase/react-native-firebase).

## Installation

You need to install the `@segment/analytics-react-native-plugin-firebase` and its dependencies: `@react-native-firebase/app` and `@react-native-firebase/analytics`

Using NPM:

```bash
npm install --save @segment/analytics-react-native-plugin-firebase @react-native-firebase/app @react-native-firebase/analytics
```

Using Yarn:

```bash
yarn add @segment/analytics-react-native-plugin-firebase @react-native-firebase/app @react-native-firebase/analytics
```

Run `pod install` after the installation to autolink the Firebase SDK.

See [React Native Firebase](https://rnfirebase.io) and [React Native Firebase Analytics](https://rnfirebase.io/analytics/usage) for more details of Firebase packages.

## Usage

Follow the [instructions for adding plugins](https://github.com/segmentio/analytics-react-native#adding-plugins) on the main Analytics client:

In your code where you initialize the analytics client call the `.add(plugin)` method with an `FirebasePlugin` instance.

```ts
import { createClient } from '@segment/analytics-react-native';

import { FirebasePlugin } from '@segment/analytics-react-native-plugin-firebase';

const segmentClient = createClient({
  writeKey: 'SEGMENT_KEY',
});

segmentClient.add({ plugin: new FirebasePlugin() });
```

## Support

Please use Github issues, Pull Requests, or feel free to reach out to our [support team](https://segment.com/help/).

## Integrating with Segment

Interested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.

## License

```
MIT License

Copyright (c) 2021 Segment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
npm package: @segment/analytics-react-native-plugin-kepler
Description: The hassle-free way to add Segment analytics to your React-Native app for Amazon Kepler
Author: Segment
Latest version: 1.0.0

# @segment/analytics-react-native-plugin-kepler

This plugin contains support for Amazon Vega as a platform for React Native apps.

## Install

Install the dependencies for this package:

`npm install react-native-uuid @amazon-devices/react-native-device-info @segment/analytics-react-native@beta`

Then install this package from npm registry

`npm install @segment/analytics-react-native-plugin-kepler`

Now create you client as follows:

```ts
// Import the createClient method from the plugin instead of the core package!
// This automatically sets up all the storage and providers specifically for Amazon Vega platform
import { createClient } from "@segment/analytics-react-native-plugin-kepler";

const segmentClient = createClient({
  writeKey: "WRITE_KEY",
});
```

You can then make use of the client just as the standard [@segment/analytics-react-native](https://github.com/segmentio/analytics-react-native/blob/ca8fb862663edf3480b42f8a1c77bd6297dd4f2e/README.md#L98) client.

See the [main readme](https://github.com/segmentio/analytics-react-native/blob/ca8fb862663edf3480b42f8a1c77bd6297dd4f2e/README.md#L98) for all options and methods

## Limitations

- `@amazon-devices/react-native-device-info` does not currently support accessing all the device information such as app name and version, screen dimensions, OS versions, locale, etc. Some information inside the context will be set to `unknown` or empty values. These will come online as Amazon starts adding this information in future package releases.
- `trackDeepLinks` option is not supported.
- `Native AnonymousId` is not supported

## Support

Please use Github issues, Pull Requests, or feel free to reach out to our [support team](https://segment.com/help/).

## Integrating with Segment

Interested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.

## License

```
MIT License

Copyright (c) 2024 Segment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
npm package: @segment/analytics.js-karma-sauce-labs-launchers
Description: A shared list of Karma/Sauce Labs launchers supported by Analytics.js and its supporting components.
Author: Segment
Latest version: 1.0.0

# analytics.js-karma-sauce-labs-launchers

A centralized list of Sauce Labs browsers used when testing Analytics.js components.

## Usage

An example `karma.conf.js`:

```js
'use strict';

var customLaunchers = require('@segment/analytics.js-karma-sauce-labs-launchers');

module.exports = function(config) {
  if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
    throw new Error('SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are required but are missing');
  }

  config.set({
    singleRun: true,

    browsers: ['PhantomJS'].concat(Object.keys(customLaunchers)),

    customLaunchers: customLaunchers,

    sauceLabs: {
      testName: require('./package.json').name
    }
  });
};
```
npm package: @segment/base64-encode
Description: Encode base-64 strings with JavaScript
Author: ForbesLindesay
Latest version: 2.0.2

[![Build Status](https://secure.travis-ci.org/ForbesLindesay/base64-encode.png?branch=master)](https://travis-ci.org/ForbesLindesay/base64-encode)
# base64-encode

  Encode base-64 strings with JavaScript

## Installation

    $ component install ForbesLindesay/base64-encode

## API

   

## License

  MIT
npm package: @segment/blocked-stats
Description: Counts and logs based upon how often the event loop is blocked
Author: Segment.io team@segment.io
Latest version: 2.2.1


# blocked-stats

  Counts and logs based upon how often the event loop is blocked.

## Usage

```js
var log = require('@segment/logger')({});
var stats = require('statsy')({});
var blocked = require('@segment/blocked-stats');

/**
 * Send data whenever the event loop blocks.
 */

const stopBlockedStats = blocked(log, stats);


// invoke on server/tests Tear Down:
stopBlockedStats();
```

## License

(The MIT License)

Copyright (c) 2014 Segment.io &lt;team@segment.io&gt;

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @segment/cookie
Description: Tiny cookie component
Latest version: 1.2.0

# cookie

  Cookie component.

## Installation

    $ npm install @segment/cookie

## Example

```js
// set
cookie('name', 'tobi')
cookie('name', 'tobi', { path: '/' })
cookie('name', 'tobi', { maxage: 60000 }) // in milliseconds
cookie('species', 'ferret')

// get
var name = cookie('name')
// => "tobi"

var cookies = cookie()
// => { name: "tobi", species: "ferret" }

// clear
cookie('name', null)
```

## License

Released under the [MIT license](LICENSE).