# loads

> Dedicated listening for xhr requests.

Latest version **0.0.4** (published 2015-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install loads
pnpm add loads
yarn add loads
bun add loads
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2015-09-17 |
| First published | 2015-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Arnout Kazemier |
| Maintainers | 3rdeden |
| Keywords | loads, xhr, load, request, ajax |

## Links

- npm: https://www.npmjs.com/package/loads
- Repository: https://github.com/unshiftio/loads
- Issues: https://github.com/unshiftio/loads/issues
- npm.io page: https://npm.io/package/loads

## Dependencies (4)

- [failure](https://npm.io/package/failure.md) 1.1.x
- [one-time](https://npm.io/package/one-time.md) 0.0.x
- [xhr-status](https://npm.io/package/xhr-status.md) 1.0.x
- [xhr-response](https://npm.io/package/xhr-response.md) 1.0.x

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2015-09-17
- 0.0.3 — 2015-05-14
- 0.0.2 — 2015-04-13
- 0.0.1 — 2015-03-25
- 0.0.0 — 2015-02-24

## README

# loads

[![Made by unshift][made-by]](http://unshift.io)[![Version npm][version]](http://browsenpm.org/package/loads)[![Build Status][build]](https://travis-ci.org/unshiftio/loads)[![Dependencies][david]](https://david-dm.org/unshiftio/loads)[![Coverage Status][cover]](https://coveralls.io/r/unshiftio/loads?branch=master)[![IRC channel][irc]](https://webchat.freenode.net/?channels=unshift)

[made-by]: https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square
[version]: https://img.shields.io/npm/v/loads.svg?style=flat-square
[build]: https://img.shields.io/travis/unshiftio/loads/master.svg?style=flat-square
[david]: https://img.shields.io/david/unshiftio/loads.svg?style=flat-square
[cover]: https://img.shields.io/coveralls/unshiftio/loads/master.svg?style=flat-square
[irc]: https://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square

Loads is a small helper library which automatically assigns and listens to the
various of XHR event hooks and emits the corrected and normalized responses over
a supplied EventEmitter instance.

## Installation

This module was primary developed with browsers in mind and is released in the
public npm registry. It can be installed by running:

```
npm install --save loads
```

## Usage

```js
var loads = require('loads')
  , xhr = new XMLHTTPRequest()
  , EventEmitter = require('events').EventEmitter;

var ee = new EventEmitter();
loads(xhr, ee);

ee.on('stream', function (data) {
  // data chunk received.
});

ee.on('end', function () {});

xhr.open(url);
xhr.send();
```

## License

[MIT](LICENSE)

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