lib/getCriticalRules.js
function updateCritical(root, update) {
  var clonedRoot = root.clone();
  if (update.type === 'rule') {
    clonedRoot.append(clean(update.clone()));
  } else {
    update.clone().each(function (rule) {
      clonedRoot.append(clean(rule.root()));
    });
  }
  return clonedRoot;
}
function updateCritical(root, update) {
  var clonedRoot = root.clone();
  if (update.type === 'rule') {
    clonedRoot.append(clean(update.clone()));
  } else {
    update.clone().each(function (rule) {
      clonedRoot.append(clean(rule.root()));
    });
  }
  return clonedRoot;
}
function updateCritical ( root , update ) { var clonedRoot = root . clone ( ) ; if ( update . type === 'rule' ) { clonedRoot . append ( clean ( update . clone ( ) ) ) ; } else { update . clone ( ) . each ( function ( rule ) { clonedRoot . append ( clean ( rule . root ( ) ) ) ; } ) ; } return clonedRoot ; }
Update a critical root.

@param {Object} root Root object to update.
@param {Object} update Update object.
@return {Object} clonedRoot Root object.
Update a critical root .