function mergePlugins(branch, sjson) {
  if (!branch) return sjson;
  if (!sjson) return branch;
  // if strict_plugins is not turned on, we merge each plugin config instead of overwriting.
  var plugins = [];
  var pluginMap = {};

  for (var pluginIndex = 0; pluginIndex < sjson.length; pluginIndex++) {
    plugins.push(sjson[pluginIndex]);
    pluginMap[sjson[pluginIndex].id] = true;
  }
  for (var branchIndex = 0; branchIndex < branch.length; branchIndex++) {
    if (!pluginMap[branch[branchIndex].id]) plugins.push(branch[branchIndex]);
  }
  return plugins;
}
function mergePlugins(branch, sjson) {
  if (!branch) return sjson;
  if (!sjson) return branch;
  // if strict_plugins is not turned on, we merge each plugin config instead of overwriting.
  var plugins = [];
  var pluginMap = {};

  for (var pluginIndex = 0; pluginIndex < sjson.length; pluginIndex++) {
    plugins.push(sjson[pluginIndex]);
    pluginMap[sjson[pluginIndex].id] = true;
  }
  for (var branchIndex = 0; branchIndex < branch.length; branchIndex++) {
    if (!pluginMap[branch[branchIndex].id]) plugins.push(branch[branchIndex]);
  }
  return plugins;
}
function mergePlugins ( branch , sjson ) { if ( ! branch ) return sjson ; if ( ! sjson ) return branch ; // if strict_plugins is not turned on, we merge each plugin config instead of overwriting. var plugins = [ ] ; var pluginMap = { } ; for ( var pluginIndex = 0 ; pluginIndex < sjson . length ; pluginIndex ++ ) { plugins . push ( sjson [ pluginIndex ] ) ; pluginMap [ sjson [ pluginIndex ] . id ] = true ; } for ( var branchIndex = 0 ; branchIndex < branch . length ; branchIndex ++ ) { if ( ! pluginMap [ branch [ branchIndex ] . id ] ) plugins . push ( branch [ branchIndex ] ) ; } return plugins ; }
merge plugins from the DB with ones from strider.json. The latter overrides the former
merge plugins from the DB with ones from strider . json . The latter overrides the former