# @dhl-uu/jquery-promise

> A lightweight Promise polyfill based on Promises/A+ compliant $.Deferred from jQuery 3

Latest version **1.1.1** (published 2018-09-13) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @dhl-uu/jquery-promise
pnpm add @dhl-uu/jquery-promise
yarn add @dhl-uu/jquery-promise
bun add @dhl-uu/jquery-promise
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-09-13 |
| First published | 2018-09-13 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Julian Gonggrijp, Digital Humanities Lab, Utrecht University |
| Maintainers | dhl-uu |
| Keywords | jquery, promise, polyfill, es6, es2015, promises-aplus |

## Links

- npm: https://www.npmjs.com/package/@dhl-uu/jquery-promise
- Repository: https://github.com/UUDigitalHumanitieslab/jquery-promise
- Issues: https://github.com/UUDigitalHumanitieslab/jquery-promise/issues
- npm.io page: https://npm.io/package/@dhl-uu/jquery-promise

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2018-09-13
- 1.1.0 — 2018-09-13

## README

# jquery-promise

A lightweight Promise polyfill based on Promises/A+ compliant $.Deferred from jQuery 3.

[![Build Status](https://travis-ci.com/UUDigitalHumanitieslab/jquery-promise.svg?branch=develop)](https://travis-ci.com/UUDigitalHumanitieslab/jquery-promise) [![Promises/A+ 1.1 compliant](https://promisesaplus.com/assets/logo-small.png)](https://promisesaplus.com/)


## Use case

jquery-promise is for you if the following conditions apply.

 - You are already using jQuery 3+ for independent reasons.
 - You need a polyfill for the ES6 `Promise` interface, for example because you are transpiling `async`/`await` syntax.
 - You want your polyfill to be as small as possible.


## Quickstart

```console
$ npm i @dhl-uu/jquery-promise
```

```js
import '@dhl-uu/jquery-promise';
```

This will only put the polyfill in global scope if there is no `Promise` global already. The polyfill implementation is also the default export of the module.


## Limitations

This is a very thin wrapper around [`jQuery.Deferred`][2]. Our polyfill `Promise` interface has the same constructor, static methods and instance methods as [the standard][4]. However, objects returned after chaining `.then`, `.catch` and `.finally` lack the `.finally` method themselves. This is beyond our control, because jQuery constructs promise objects as plain objects in a closure and there is no prototype that we can extend. This is unlikely to cause problems in practice. You still get Promises/A+ compliant then-able objects.

[2]: https://api.jquery.com/category/deferred-object/
[4]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise


*Made by*

[![Digital Humanities Lab](http://dhstatic.hum.uu.nl/logo-lab/png/dighum-logo.png)](https://dig.hum.uu.nl)

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