src/page-ready.js
function createCompleteCallback(name) {
        return function(data) {
            _store[name] = data;

            var allCallbacksComplete = Object.keys(_store).reduce(isStoreValid, true);
            if (allCallbacksComplete) {
                clearTimeout(pageReadyWarning);
                ceddl.emitEvent('pageready', _store);
            }
        };
    }
function createCompleteCallback(name) {
        return function(data) {
            _store[name] = data;

            var allCallbacksComplete = Object.keys(_store).reduce(isStoreValid, true);
            if (allCallbacksComplete) {
                clearTimeout(pageReadyWarning);
                ceddl.emitEvent('pageready', _store);
            }
        };
    }
function createCompleteCallback ( name ) { return function ( data ) { _store [ name ] = data ; var allCallbacksComplete = Object . keys ( _store ) . reduce ( isStoreValid , true ) ; if ( allCallbacksComplete ) { clearTimeout ( pageReadyWarning ) ; ceddl . emitEvent ( 'pageready' , _store ) ; } } ; }
Helper function that creates event callbacks which set the event as
completed on execution, as well as checking whether all keys in the
store are true, and dispatch the pageready event should that be the
case.
@param {String} name Event name to mark as completed on execution.
@returns {Function}
Helper function that creates event callbacks which set the event as completed on execution as well as checking whether all keys in the store are true and dispatch the pageready event should that be the case .