Skip to content
Little promise library.
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src
test
.gitignore
README.md
bower.json
index.html
package.json

README.md

µP.js

A agnostic and lightweight javascript promise library.

Methods

  • uP.resolve( arguments );
  • uP.then( callback );
var p = new uP();

    function get(data) {

        setTimeout(function(){

            p.resolve(data);

        }, 500);

        return p;

    };

    get('Knowledge!')
        .then(function(data) {

            alert(data);

            return get('Money!');

        })
        .then(function(data) {

            alert(data);

        });

Bower

bower install up.js
Something went wrong with that request. Please try again.