scripts/wee-screen.js
function _addRule(conf) {
    // Attach unique identifier
    conf.i = id++;

    // Only setup watching when enabled
    if (conf.watch !== false) {
        events.push(conf);

        // Only attach event once
        if (! bound) {
            const run = _run.bind(this, false, 0, null);
            bound = 1;
            events = [conf];

            // Attach resize event
            _win.addEventListener('resize', run);
        }
    }

    // Evaluate rule immediately if not disabled
    if (conf.init !== false) {
        _run(true, [conf]);
    }
}
function _addRule(conf) {
    // Attach unique identifier
    conf.i = id++;

    // Only setup watching when enabled
    if (conf.watch !== false) {
        events.push(conf);

        // Only attach event once
        if (! bound) {
            const run = _run.bind(this, false, 0, null);
            bound = 1;
            events = [conf];

            // Attach resize event
            _win.addEventListener('resize', run);
        }
    }

    // Evaluate rule immediately if not disabled
    if (conf.init !== false) {
        _run(true, [conf]);
    }
}
function _addRule ( conf ) { // Attach unique identifier conf . i = id ++ ; // Only setup watching when enabled if ( conf . watch !== false ) { events . push ( conf ) ; // Only attach event once if ( ! bound ) { const run = _run . bind ( this , false , 0 , null ) ; bound = 1 ; events = [ conf ] ; // Attach resize event _win . addEventListener ( 'resize' , run ) ; } } // Evaluate rule immediately if not disabled if ( conf . init !== false ) { _run ( true , [ conf ] ) ; } }
Bind individual rule

@private
@param {Object} conf - breakpoint rules
@param {Array} [conf.args] - callback arguments
@param {Function} conf.callback
@param {boolean} [conf.each=false] - execute for each matching breakpoint
@param {boolean} [conf.init=true] - check event on load
@param {number} [conf.max] - maximum breakpoint value
@param {number} [conf.min] - minimum breakpoint value
@param {boolean} [conf.once=false] - only execute the callback once
@param {Object} [conf.scope] - callback scope
@param {number} [conf.size] - specific breakpoint value
@param {boolean} [conf.watch=true] - check event on screen resize
@param {string} [conf.namespace] - namespace the event
Bind individual rule