src/util.js
function createStyleDictionary(styles) {
    let total = {}
    for (let k in styles) {
        const val = styles[k]
        //sort clz name to judge arbitrary order in multi-className
        k = sortSeq(k)
        //merge style chain from last condition
        const lastEle = getLastEle(k)
        //no sharing data. create new chain
        if (!total.hasOwnProperty(lastEle)) {
            total[lastEle] = createItem(k, val)[lastEle]
        } else {
            //merge chain data
            merge(createItem(k, styles[k]), total)
        }
    }
    return total
}
function createStyleDictionary(styles) {
    let total = {}
    for (let k in styles) {
        const val = styles[k]
        //sort clz name to judge arbitrary order in multi-className
        k = sortSeq(k)
        //merge style chain from last condition
        const lastEle = getLastEle(k)
        //no sharing data. create new chain
        if (!total.hasOwnProperty(lastEle)) {
            total[lastEle] = createItem(k, val)[lastEle]
        } else {
            //merge chain data
            merge(createItem(k, styles[k]), total)
        }
    }
    return total
}
function createStyleDictionary ( styles ) { let total = { } for ( let k in styles ) { const val = styles [ k ] //sort clz name to judge arbitrary order in multi-className k = sortSeq ( k ) //merge style chain from last condition const lastEle = getLastEle ( k ) //no sharing data. create new chain if ( ! total . hasOwnProperty ( lastEle ) ) { total [ lastEle ] = createItem ( k , val ) [ lastEle ] } else { //merge chain data merge ( createItem ( k , styles [ k ] ) , total ) } } return total }
create special style dict structure for high performance query
@param styles style object
create special style dict structure for high performance query