ocjojo / YAPL

Yet another promise library. It wraps the native ES6 Promise to provide syntax similar to jQuery.Deferred

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YAPL

Yet another promise library. It wraps the native ES6 Promise to provide syntax similar to jQuery.Deferred

Example:

var y = require('yapl');

function setTimeoutWrite(str){
    var deferred = y();
    setTimeout(function(){
        deferred.resolve(str);
    }, 1000);
    return deferred;
}

setTimeoutWrite('Hello World').then(console.log);

About

Yet another promise library. It wraps the native ES6 Promise to provide syntax similar to jQuery.Deferred

License:MIT License


Languages

Language:JavaScript 100.0%