packages/okam-build/lib/processor/css/plugins/match-media-params.js
function parseAppMediaQueryParam(allAppTypes, params) {
    let ctx = {
        allAppTypes,
        hasAppMediaType: false,
        tokens: []
    };

    let buffer = '';
    for (let i = 0, len = params.length; i < len; i++) {
        let c = params[i];
        if (QUERY_PARAMS_SEPARATORS.includes(c)) {
            buffer = initAppMediaQueryToken(ctx, buffer, c);
            if (buffer === true) {
                buffer = '';
                break;
            }
        }
        else {
            buffer += c;
        }
    }

    if (buffer) {
        let result = initAppMediaTargetInfo(ctx, buffer.trim());
        result || (ctx.tokens.push(buffer));
    }

    return ctx;
}
function parseAppMediaQueryParam(allAppTypes, params) {
    let ctx = {
        allAppTypes,
        hasAppMediaType: false,
        tokens: []
    };

    let buffer = '';
    for (let i = 0, len = params.length; i < len; i++) {
        let c = params[i];
        if (QUERY_PARAMS_SEPARATORS.includes(c)) {
            buffer = initAppMediaQueryToken(ctx, buffer, c);
            if (buffer === true) {
                buffer = '';
                break;
            }
        }
        else {
            buffer += c;
        }
    }

    if (buffer) {
        let result = initAppMediaTargetInfo(ctx, buffer.trim());
        result || (ctx.tokens.push(buffer));
    }

    return ctx;
}
Parse app media query params info

@inner
@param {Array.<string>} allAppTypes all supported media target types
@param {string} params the full media query params
@return {{hasAppMediaType: boolean, tokens: Array.<string>}}