demo/editor/kissy.js
function (runtime, path, rules) {
            var mappedRules = rules ||
                    runtime.Config.mappedRules ||
                    [],
                i,
                m,
                rule;
            for (i = 0; i < mappedRules.length; i++) {
                rule = mappedRules[i];
                if (m = path.match(rule[0])) {
                    return path.replace(rule[0], rule[1]);
                }
            }
            return path;
        }
function (runtime, path, rules) {
            var mappedRules = rules ||
                    runtime.Config.mappedRules ||
                    [],
                i,
                m,
                rule;
            for (i = 0; i < mappedRules.length; i++) {
                rule = mappedRules[i];
                if (m = path.match(rule[0])) {
                    return path.replace(rule[0], rule[1]);
                }
            }
            return path;
        }
function ( runtime , path , rules ) { var mappedRules = rules || runtime . Config . mappedRules || [ ] , i , m , rule ; for ( i = 0 ; i < mappedRules . length ; i ++ ) { rule = mappedRules [ i ] ; if ( m = path . match ( rule [ 0 ] ) ) { return path . replace ( rule [ 0 ] , rule [ 1 ] ) ; } } return path ; }
Get mapped path.
@param runtime Module container, such as KISSY
@param {String} path module path
@param [rules] map rules
@return {String} mapped path
Get mapped path .