docs/vendor/mixitup/mixitup.js
function(libraries) {
            var deferred       = null,
                promiseWrapper = null,
                $              = null;

            promiseWrapper = new this.Deferred();

            if (mixitup.features.has.promises) {
                // ES6 native promise or polyfill

                promiseWrapper.promise = new Promise(function(resolve, reject) {
                    promiseWrapper.resolve = resolve;
                    promiseWrapper.reject  = reject;
                });
            } else if (($ = (window.jQuery || libraries.$)) && typeof $.Deferred === 'function') {
                // jQuery

                deferred = $.Deferred();

                promiseWrapper.promise = deferred.promise();
                promiseWrapper.resolve = deferred.resolve;
                promiseWrapper.reject  = deferred.reject;
            } else if (window.console) {
                // No implementation

                console.warn(mixitup.messages.warningNoPromiseImplementation());
            }

            return promiseWrapper;
        }
function(libraries) {
            var deferred       = null,
                promiseWrapper = null,
                $              = null;

            promiseWrapper = new this.Deferred();

            if (mixitup.features.has.promises) {
                // ES6 native promise or polyfill

                promiseWrapper.promise = new Promise(function(resolve, reject) {
                    promiseWrapper.resolve = resolve;
                    promiseWrapper.reject  = reject;
                });
            } else if (($ = (window.jQuery || libraries.$)) && typeof $.Deferred === 'function') {
                // jQuery

                deferred = $.Deferred();

                promiseWrapper.promise = deferred.promise();
                promiseWrapper.resolve = deferred.resolve;
                promiseWrapper.reject  = deferred.reject;
            } else if (window.console) {
                // No implementation

                console.warn(mixitup.messages.warningNoPromiseImplementation());
            }

            return promiseWrapper;
        }
function ( libraries ) { var deferred = null , promiseWrapper = null , $ = null ; promiseWrapper = new this . Deferred ( ) ; if ( mixitup . features . has . promises ) { // ES6 native promise or polyfill promiseWrapper . promise = new Promise ( function ( resolve , reject ) { promiseWrapper . resolve = resolve ; promiseWrapper . reject = reject ; } ) ; } else if ( ( $ = ( window . jQuery || libraries . $ ) ) && typeof $ . Deferred === 'function' ) { // jQuery deferred = $ . Deferred ( ) ; promiseWrapper . promise = deferred . promise ( ) ; promiseWrapper . resolve = deferred . resolve ; promiseWrapper . reject = deferred . reject ; } else if ( window . console ) { // No implementation console . warn ( mixitup . messages . warningNoPromiseImplementation ( ) ) ; } return promiseWrapper ; }
Abstracts an ES6 promise into a q-like deferred interface for storage and deferred resolution.

@private
@param  {object} libraries
@return {h.Deferred}
Abstracts an ES6 promise into a q - like deferred interface for storage and deferred resolution .