Checks whether the specified threshold options have been met. Issues a
warning if not.

@param {Collector} collector The collector containing the coverage
@param {Object} options The options describing the thresholds
544628
function (collector, options) {
	var summaries = [];
	var thresholds = options.thresholds;

	var files = collector.files();
	files.forEach(function(file) {
		summaries.push(istanbul.utils.summarizeFileCoverage(
				collector.fileCoverageFor(file)));
	});

	var finalSummary = istanbul.utils.mergeSummaryObjects.apply(null,
			summaries);

	grunt.util._.each(thresholds, function (threshold, metric) {
		var actual = finalSummary[metric];
		if(!actual) {
			grunt.warn('unrecognized metric: ' + metric);
		}
		if(actual.pct < threshold) {
			grunt.warn('expected ' + metric + ' coverage to be at least '
					+ threshold + '% but was ' + actual.pct + '%');
		}
	});
}
313186
function assertCollectionSizeLeast(_super) {
    return function(n) {
      if (utils.flag(this, 'immutable.collection.size')) {
        assertIsIterable(this._obj);

        const { size } = this._obj;
        new Assertion(size).a('number');

        this.assert(
          size >= n,
          'expected #{this} to have a size of at least #{exp} but got #{act}',
          'expected #{this} to not have a size of at least #{exp} but got ' +
            '#{act}',
          n,
          size
        );
      } else {
        _super.apply(this, arguments);
      }
    };
  }
1226857
function tryShowTasks(options, collection)
{
    if (options.getValueFor('showTasks') !== undefined)
    {
        REPORTS.printTaskList(collection);
        return true;
    }
    return false;
}
610769
function (model, options) {
        if (this === model.collection) delete model.collection;
        this._deIndex(model);
        if (model.off) model.off('all', this._onModelEvent, this);
    }
462935
function getCollector() {
    var collector = new Collector();

    if (global['__coverage__']) {
        collector.add(global['__coverage__']);
    } else {
        console.error('No global coverage found for the node process');
    }
    return collector;
}
688721
function(options) {
    options = options ? extend({}, options) : {};
    if (options.parse === void 0){
      options.parse = true;
    }
    var collection = this;
    var listener = {};
    var listenerKey;

    options.cb = options.callback;
    options.callback = function (err, response){
      callback(err, collection, response, options);
    };

    options.respCallback = function cb(data, cbServer){
      var method = options.reset ? 'reset' : 'set';
      collection.removeListeners([collection.events.onFetch]);
      if(cbServer){
        cbServer();
      }
      if(data.err){
        return callback(data.err, collection, data, options);
      }
      collection[method](data.response, options);
      callback(data.err, collection, data, options);
    };

    listenerKey = this.events.onFetch;
    listener[listenerKey] = {fn: options.respCallback, active: true};
    this.addListeners(listener);
    this.emit(this.events.fetch, this, options);
    return collection;
  }
1125277
function assertThresholds(thresholds) {
  if (!elv(thresholds)) return null;

  if (typeof thresholds !== 'object') {
    throw new TypeError(msg.argThresholds);
  }

  const avg = elv.coalesce(thresholds.avg, false);
  const max = elv.coalesce(thresholds.max, false);
  const min = elv.coalesce(thresholds.min, false);
  const { target } = thresholds;

  if (avg !== false && typeof avg !== 'number') {
    throw new TypeError(msg.argAvg);
  }

  if (max !== false && typeof max !== 'number') {
    throw new TypeError(msg.argMax);
  }

  if (min !== false && typeof min !== 'number') {
    throw new TypeError(msg.argMin);
  }

  if (!Number.isInteger(target) || target < 0) {
    throw new TypeError(msg.argTarget);
  }

  return {
    avg,
    max,
    min,
    target,
  };
}
1195481
function validateConfig(config) {
    let missing = [];
    _.each(requiredOptions, function (option) {
      if (config[option] === undefined) {
        missing.push(option);
      }
    });
    if (missing.length > 0) {
      throw new Error('The following required parameters were not provided: ' + missing.join(','));
    }
  }
654120
function checkThresholds(metrics, thresholds) {
  if (!elv(thresholds)) return;

  const target = metrics[thresholds.target];

  for (let i = 0; i < metrics.length; i++) {
    if (i === thresholds.target) continue;

    const other = metrics[i];
    assertThreshold(target.avg, other.avg, thresholds.avg);
    assertThreshold(target.max, other.max, thresholds.max);
    assertThreshold(target.min, other.min, thresholds.min);
  }
}
1028661
function(options) {
  "use strict";
  stream.Transform.call(this, options);

  options = options || {};

  this.probability = options.probability || 0;
  this.deviation = Math.abs(options.deviation || 0);

  this.whiteList = options.whiteList || [];
  this.blackList = options.blackList || [];
  this.func = options.func;
}
1244419
function isSatisfiable (comparators, options) {
  var result = true
  var remainingComparators = comparators.slice()
  var testComparator = remainingComparators.pop()

  while (result && remainingComparators.length) {
    result = remainingComparators.every(function (otherComparator) {
      return testComparator.intersects(otherComparator, options)
    })

    testComparator = remainingComparators.pop()
  }

  return result
}
413940
protected void checkHealth(long threshold, NodeHealthChecker healthChecker) {
        final int state = this.state;
        if (anyAreSet(state, REMOVED | ACTIVE_PING)) {
            return;
        }
        healthCheckPing(threshold, healthChecker);
    }
878994
public static <T, U> Collector<T, ?, Optional<U>> percentile(double percentile, Function<? super T, ? extends U> function, Comparator<? super U> comparator) {
        return collectingAndThen(percentileBy(percentile, function, comparator), t -> t.map(function));
    }
1370296
private static boolean checkIfCollectionExists(CloudSolrClient server, String collection) throws KeeperException, InterruptedException {
        ZkStateReader zkStateReader = server.getZkStateReader();
        zkStateReader.updateClusterState(true);
        ClusterState clusterState = zkStateReader.getClusterState();
        return clusterState.getCollectionOrNull(collection) != null;
    }
236694
private boolean thereExistUnmarkedHItemsLighterThanTarget(final double threshold) {
    for (int i = 0; i < gadget_.getHRegionCount(); ++i) {
      if ((gadget_.getWeight(i) < threshold) && !gadget_.getMark(i)) {
        return true;
      }
    }

    return false;
  }
884307
function validateOptions(options) {
  if (_.isNil(options)) {
    return null;
  }

  if (!_.isPlainObject(options)) {
    return new TypeError('Expected `options` to be an object or not defined.');
  }

  if (!isOptionalIntAbove(options.time, 0)) {
    return new TypeError('Expected `options.time` to be an integer that is 0 or greater.');
  }

  if (!isOptionalIntAbove(options.count, 1)) {
    return new TypeError('Expected `options.count` to be an integer greater than 0.');
  }

  return null;
}
575116
function checkNextRequire(options) {

		if (!modulep) {
			return;
		}

		if (options.strict === false) {
			return;
		}

		// Overwrite the original wrap method
		modulep.wrap = function wrap(script) {

			var head;

			// Restore the original functions
			modulep.wrap = modulep.original_wrap;
			modulep._resolveFilename = modulep.original_resolve;

			if (options.add_wrapper !== false) {
				if (options.add_wrapper || script.slice(0, 14) != 'module.exports') {

					if (script.indexOf('__cov_') > -1 && script.indexOf('module.exports=function ') > 7) {
						// We're in coverage mode, just ignore
					} else {
						// Yes: "added_wrapper", as in "done"
						options.added_wrapper = true;

						head = 'module.exports = function(';

						if (options.arguments) {
							head += Blast.getArgumentConfiguration(options.arguments).names.join(',');
						} else {
							head += 'Blast, Collection, Bound, Obj';
						}

						head += ') {';

						script = head + script + '\n};';
					}
				}
			}

			// Add the strict wrapper for this requirement
			return modulep.strict_wrapper + script + modulep.wrapper[1];
		};

		// Overwrite the original _resolveFilename method
		modulep._resolveFilename = function _resolveFilename(request, parent, is_main) {
			try {
				return modulep.original_resolve(request, parent, is_main);
			} catch (err) {
				modulep.wrap = modulep.original_wrap;
				modulep._resolveFilename = modulep.original_resolve;
				throw err;
			}
		};
	}