Skip to content
/ q Public

Library for Promises/A+ in front end. Inspired by kriskowal/q, and much smaller.

Notifications You must be signed in to change notification settings

dylannil/q

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Q — library for promises Build Status

Promise/A+ is the specification what this implementation follow. It can be used in any allowed way under Promise/A+.

This implementation is quite small, and it is easy to merge into other code without introduction of redundant code. This is very helpful when developing a webapp.

Environments in which to use Q

  • Browser support
  • Nodejs
  • Browser extensions

Runing the Unit Tests

You need the necessary dependencies:

npm install

Run tests

npm test

Tutorial

Q(function(resolve, reject) {
    // Async or sync operation
    // success: resolve(val)
    // error: reject(reason)
}).then(function(val) {
    // onresolved
}, function(reason) {
    // onrejected
});

License

Copyright 2015–2016 Xiao-Bo Li MIT License

About

Library for Promises/A+ in front end. Inspired by kriskowal/q, and much smaller.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published