Skip to content

jaubourg/jquery-deferred-for-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Deferreds for nodejs

jQuery Deferreds source and unit tests ported verbatim to nodejs using minimal, automated, code transformation.

Rationale

This is the exact same code, running the exact same unit tests. Why use a bad copy when you can use the original?

Installation

  • use npm: npm install JQDeferred
  • or put JQDeferred as a dependency in package.json.

Using

var Deferred = require( "JQDeferred" );

Correspondences

jQuery JQDeferred
$.Deferred Deferred
$._Deferred Deferred._Deferred
$.when Deferred.when
$.Callbacks Deferred.Callbacks

_Deferred only available prior to 1.7.0

Callbacks only available as of 1.7.0.

Documentation

Just head to the jQuery API site:

Versioning

There is an exact correspondence between the version of the package and the version of jQuery from which it has been extracted. So, if you want to use Deferreds as they were in jQuery 1.5.2, just use npm install JQDeferred@1.5.2.

Of course, this is not really semantic versioning but it makes a lot more sense than maintaining a separate version.

About

jQuery's Deferreds source and unit tests ported verbatim to nodejs using minimal, automated, code transformation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published