lib/renderer.js
function checkPlugins(pugs) {
    var def_pugs_obj = {};
    for(var i = 0;i < def_pugs_lst.length;i++)
        def_pugs_obj[def_pugs_lst[i]] = {'name': def_pugs_lst[i], 'enable': true};
    var _t = [];
    for(var i = 0;i < pugs.length;i++) {
        if(!(pugs[i] instanceof Object) || !(pugs[i].plugin instanceof Object)) continue;
        var pug_name = pugs[i].plugin.name;
        if(!pug_name) continue;
        if(pugs[i].plugin.enable == null || pugs[i].plugin.enable == undefined || pugs[i].plugin.enable != true)
            pugs[i].plugin.enable = false;
        if(def_pugs_obj[pug_name]) {
            def_pugs_obj[pug_name] = pugs[i].plugin;
        }
        else _t.push(pugs[i].plugin);
    }

    for(var i = def_pugs_lst.length - 1;i >= 0;i--) {
        _t.unshift(def_pugs_obj[def_pugs_lst[i]]);
    }
    return _t;
}
function checkPlugins(pugs) {
    var def_pugs_obj = {};
    for(var i = 0;i < def_pugs_lst.length;i++)
        def_pugs_obj[def_pugs_lst[i]] = {'name': def_pugs_lst[i], 'enable': true};
    var _t = [];
    for(var i = 0;i < pugs.length;i++) {
        if(!(pugs[i] instanceof Object) || !(pugs[i].plugin instanceof Object)) continue;
        var pug_name = pugs[i].plugin.name;
        if(!pug_name) continue;
        if(pugs[i].plugin.enable == null || pugs[i].plugin.enable == undefined || pugs[i].plugin.enable != true)
            pugs[i].plugin.enable = false;
        if(def_pugs_obj[pug_name]) {
            def_pugs_obj[pug_name] = pugs[i].plugin;
        }
        else _t.push(pugs[i].plugin);
    }

    for(var i = def_pugs_lst.length - 1;i >= 0;i--) {
        _t.unshift(def_pugs_obj[def_pugs_lst[i]]);
    }
    return _t;
}
function checkPlugins ( pugs ) { var def_pugs_obj = { } ; for ( var i = 0 ; i < def_pugs_lst . length ; i ++ ) def_pugs_obj [ def_pugs_lst [ i ] ] = { 'name' : def_pugs_lst [ i ] , 'enable' : true } ; var _t = [ ] ; for ( var i = 0 ; i < pugs . length ; i ++ ) { if ( ! ( pugs [ i ] instanceof Object ) || ! ( pugs [ i ] . plugin instanceof Object ) ) continue ; var pug_name = pugs [ i ] . plugin . name ; if ( ! pug_name ) continue ; if ( pugs [ i ] . plugin . enable == null || pugs [ i ] . plugin . enable == undefined || pugs [ i ] . plugin . enable != true ) pugs [ i ] . plugin . enable = false ; if ( def_pugs_obj [ pug_name ] ) { def_pugs_obj [ pug_name ] = pugs [ i ] . plugin ; } else _t . push ( pugs [ i ] . plugin ) ; } for ( var i = def_pugs_lst . length - 1 ; i >= 0 ; i -- ) { _t . unshift ( def_pugs_obj [ def_pugs_lst [ i ] ] ) ; } return _t ; }
General default plugin config
@param  {List} pugs plugin List.
@return {List}        plugin List.
General default plugin config