# signalr-amd

> An AMD compatible fork of the official signalR.JS package

Latest version **2.2.6** (published 2015-09-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install signalr-amd
pnpm add signalr-amd
yarn add signalr-amd
bun add signalr-amd
```

## 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 | 2.2.6 |
| Published | 2015-09-10 |
| First published | 2015-09-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | UltraGenda |
| Maintainers | ultragendacsc |
| Keywords | signalR, amd |

## Links

- npm: https://www.npmjs.com/package/signalr-amd
- npm.io page: https://npm.io/package/signalr-amd

## Dependencies (1)

- [jquery](https://npm.io/package/jquery.md) >=1.6.4

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 2.2.6 (latest) — 2015-09-10
- 2.2.5 — 2015-09-10
- 2.2.4 — 2015-09-10
- 2.2.3 — 2015-09-10
- 2.2.2 — 2015-09-09
- 2.2.1 — 2015-09-09
- 2.2.0 — 2015-09-09

## README

_This version currently corresponds with SignalR 2.2.0_

This is an unofficial node module for the SignalR javascript client that is wrapped in 
an AMD definition.

The major and minor version number are identical to the official SignalR package major and minor version number. The build number of this package will increase with code / documentation updates for this package specifically.

## Usage

This module returns an object literal containing `$.connection` and `$.hubConnection` as its properties.

```javascript
var signalr = require('signalr-amd');

// identical to $.connection, for people who use the generated proxies
var connection = signalr.connection;
// identical to $.hubConnection, for people who don't use the generated proxies
var hubConnection = signalr.hubConnection;
...
```

However, even just loading the file will decorate jQuery with the usual properties.
So this is equally valid (as long as jQuery is a singleton):

```javascript
require('signalr-amd');
var $ = require('jquery');
var connection = $.connection;
var hubConnection = $.hubConnection;
...
```

See [The SignalR Javascript guide](http://www.asp.net/signalr/overview/guide-to-the-api/hubs-api-guide-javascript-client) for more information.

## Implementation

This is what the additional code looks like:

```javascript
if ( typeof define === "function" && define.amd ) {
  define("signalr", ["jquery"], function (jQuery) {
    return factory(jQuery);
  });
} else {
  factory(window.jQuery || window.$);
}
```

where `factory` is a function around the original SignalR code.

This makes it compatible with AMD compatible libraries such as RequireJS, Webpack, ...

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