Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

pron

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pron

Convert jquery events to promises

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Pron v0.1.0

Convert jQuery events to jQuery Deferreds

Installation

Pron supports installation via npm:

npm install pron

or bower (source and distribution files only, no tests or build tasks):

bower install pron

Usage

Pron has been developed to support jQuery event syntax as much as possible with additional functionality for multiple required events.

Single event:

$('body').pron('event1).then(function(){ ... });

The promise would resolve when event1 is triggered.

Multiple optional events:

Much like jQuery event syntax, this uses a single string with space seperated events.

$('body').pron('event1 event2').then(function(){ ... });

The promise would resolve when either event1 or event2 is triggered.

Multiple required events:

This takes comma seperate event strings (you can even use multiple optional events within these).

$('body').pron('event1','event2').then(function(){ ... });

The promise would resolve when both event1 and event2 and triggered.

Keywords

jquery

FAQs

Package last updated on 01 Nov 2014

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