scripts/wee-screen.js
function _run(init, rules, namespace) {
    const size = _size();
    let evts = rules || events;
    let	i;

    // If breakpoint has been hit or resize logic initialized
    if (size && (init || size !== current)) {
        if (namespace) {
            evts = evts.filter(obj => obj.namespace === namespace);
        }

        i = evts.length;

        while (i--) {
            const evt = evts[i];

            if (_eq(evt, size, init)) {
                const f = init && ! current;
                const data = {
                    dir: f ? 0 : (size > current ? 1 : -1),
                    init: f,
                    prev: current,
                    size,
                };

                $exec(evt.callback, {
                    args: evt.args ? [data].concat(evt.args) : [data],
                    scope: evt.scope,
                });

                // Disable future execution if once
                if (evt.once) {
                    events = events.filter(obj => obj.i !== evt.i);
                }
            }
        }

        // Cache current value
        current = size;
    }
}
function _run(init, rules, namespace) {
    const size = _size();
    let evts = rules || events;
    let	i;

    // If breakpoint has been hit or resize logic initialized
    if (size && (init || size !== current)) {
        if (namespace) {
            evts = evts.filter(obj => obj.namespace === namespace);
        }

        i = evts.length;

        while (i--) {
            const evt = evts[i];

            if (_eq(evt, size, init)) {
                const f = init && ! current;
                const data = {
                    dir: f ? 0 : (size > current ? 1 : -1),
                    init: f,
                    prev: current,
                    size,
                };

                $exec(evt.callback, {
                    args: evt.args ? [data].concat(evt.args) : [data],
                    scope: evt.scope,
                });

                // Disable future execution if once
                if (evt.once) {
                    events = events.filter(obj => obj.i !== evt.i);
                }
            }
        }

        // Cache current value
        current = size;
    }
}
function _run ( init , rules , namespace ) { const size = _size ( ) ; let evts = rules || events ; let i ; // If breakpoint has been hit or resize logic initialized if ( size && ( init || size !== current ) ) { if ( namespace ) { evts = evts . filter ( obj => obj . namespace === namespace ) ; } i = evts . length ; while ( i -- ) { const evt = evts [ i ] ; if ( _eq ( evt , size , init ) ) { const f = init && ! current ; const data = { dir : f ? 0 : ( size > current ? 1 : - 1 ) , init : f , prev : current , size , } ; $exec ( evt . callback , { args : evt . args ? [ data ] . concat ( evt . args ) : [ data ] , scope : evt . scope , } ) ; // Disable future execution if once if ( evt . once ) { events = events . filter ( obj => obj . i !== evt . i ) ; } } } // Cache current value current = size ; } }
Check mapped rules for matching conditions

@private
@param {boolean} [init=false] - initial page load
@param {Array} [rules] - breakpoint rules
@param {string} [namespace] - namespace for map object
Check mapped rules for matching conditions