How to use the defer function from when

Find comprehensive JavaScript when.defer code examples handpicked from public code repositorys.

9973
9974
9975
9976
9977
9978
9979
9980
9981
9982

var transformer = function (func_promise) {
    return function (/* ... */) {
        var args = arguments;
        return result_transformer(when(func_promise, function (func) {
            var d = when.defer();
            func.apply(null, append(args, function (err, val) {
                if (err) {
                    d.reject(err);
                } else {
fork icon1
star icon0
watch icon1

+ 2 other calls in file