Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dhl-uu/jquery-promise

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhl-uu/jquery-promise

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

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

jquery-promise

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

Build Status Promises/A+ 1.1 compliant

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

$ npm i @dhl-uu/jquery-promise
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. Our polyfill Promise interface has the same constructor, static methods and instance methods as the standard. 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.

Made by

Digital Humanities Lab

Keywords

FAQs

Package last updated on 13 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc