function checkRangeExpression(range, version) {
  const expressions = range.split(rangeRegex);

  invariant(
    expressions.length > 0 && expressions.length <= 2,
    'the "-" operator expects exactly 2 operands'
  );

  if (expressions.length === 1) {
    return checkSimpleExpression(expressions[0], version);
  } else {
    const [startVersion, endVersion] = expressions;
    invariant(
      isSimpleVersion(startVersion) && isSimpleVersion(endVersion),
      'operands to the "-" operator must be simple (no modifiers)'
    );

    return (
      checkSimpleExpression('>=' + startVersion, version) &&
      checkSimpleExpression('<=' + endVersion, version)
    );
  }
}
Splits input `range` on " - " (the surrounding whitespace is required) and
returns true if version falls between the two operands.

@param {string} range
@param {string} version
@returns {boolean}