lib/script/nej/util.js
function(name,config){
        var patch = config.patch;
        if (!patch){
            return;
        }
        // cache patch content if not x.patch.js
        var content = _io.getFromCache(patch);
        if (!content){
            var ret = [
                _path.uri2key(patch),
                'function(x){return x;}',
                _path.uri2key(config.uri)
            ];
            _io.cache(config.patch,util.format(
                '%s(%s);',name,ret.join(',')
            ));
        }
        // cache dependency list for x.patch.js
        if (!_dep.get(patch)){
            _dep.set(patch,[config.uri]);
        }
    }
function(name,config){
        var patch = config.patch;
        if (!patch){
            return;
        }
        // cache patch content if not x.patch.js
        var content = _io.getFromCache(patch);
        if (!content){
            var ret = [
                _path.uri2key(patch),
                'function(x){return x;}',
                _path.uri2key(config.uri)
            ];
            _io.cache(config.patch,util.format(
                '%s(%s);',name,ret.join(',')
            ));
        }
        // cache dependency list for x.patch.js
        if (!_dep.get(patch)){
            _dep.set(patch,[config.uri]);
        }
    }
function ( name , config ) { var patch = config . patch ; if ( ! patch ) { return ; } // cache patch content if not x.patch.js var content = _io . getFromCache ( patch ) ; if ( ! content ) { var ret = [ _path . uri2key ( patch ) , 'function(x){return x;}' , _path . uri2key ( config . uri ) ] ; _io . cache ( config . patch , util . format ( '%s(%s);' , name , ret . join ( ',' ) ) ) ; } // cache dependency list for x.patch.js if ( ! _dep . get ( patch ) ) { _dep . set ( patch , [ config . uri ] ) ; } }
format patch
format patch