lib/kissy/5.0.0-alpha.3/build/promise-debug.js
function (generatorFunc) {
            return function () {
                var generator = generatorFunc.apply(this, arguments);
                function doAction(action, arg) {
                    var result;    // in case error on first
                    // in case error on first
                    try {
                        result = generator[action](arg);
                    } catch (e) {
                        return new Reject(e);
                    }
                    if (result.done) {
                        return result.value;
                    }
                    return when(result.value, next, throwEx);
                }
                function next(v) {
                    return doAction('next', v);
                }
                function throwEx(e) {
                    return doAction('throw', e);
                }
                return next();
            };
        }
function (generatorFunc) {
            return function () {
                var generator = generatorFunc.apply(this, arguments);
                function doAction(action, arg) {
                    var result;    // in case error on first
                    // in case error on first
                    try {
                        result = generator[action](arg);
                    } catch (e) {
                        return new Reject(e);
                    }
                    if (result.done) {
                        return result.value;
                    }
                    return when(result.value, next, throwEx);
                }
                function next(v) {
                    return doAction('next', v);
                }
                function throwEx(e) {
                    return doAction('throw', e);
                }
                return next();
            };
        }
function ( generatorFunc ) { return function ( ) { var generator = generatorFunc . apply ( this , arguments ) ; function doAction ( action , arg ) { var result ; // in case error on first // in case error on first try { result = generator [ action ] ( arg ) ; } catch ( e ) { return new Reject ( e ) ; } if ( result . done ) { return result . value ; } return when ( result . value , next , throwEx ) ; } function next ( v ) { return doAction ( 'next' , v ) ; } function throwEx ( e ) { return doAction ( 'throw' , e ) ; } return next ( ) ; } ; }
provide es6 generator
@param generatorFunc es6 generator function which has yielded promise
provide es6 generator