       ** (Version.InvalidRequirementError) == ==1.0.0
 
   """
-  @spec match?(version, requirement) :: boolean
-  def match?(version, requirement) when is_binary(requirement) do
+  @spec match?(version, requirement, Keyword.t) :: boolean
+  def match?(version, requirement, opts \\ [])
+
+  def match?(version, requirement, opts) when is_binary(requirement) do
     case parse_requirement(requirement) do
       {:ok, requirement} ->
-        match?(version, requirement)
+        match?(version, requirement, opts)
       :error ->
         raise InvalidRequirementError, message: requirement
     end
   end
 
-  def match?(version, %Requirement{matchspec: spec}) do
-    {:ok, result} = :ets.test_ms(to_matchable(version), spec)
+  def match?(version, %Requirement{matchspec: spec}, opts) do
+    allow_pre = Keyword.get(opts, :allow_pre, true)
+    {:ok, result} = :ets.test_ms(to_matchable(version, allow_pre), spec)
     result != false
   end
 

    end
  end

  defp to_matchable(%Version{major: major, minor: minor, patch: patch, pre: pre}) do
    {major, minor, patch, pre}
  end

  defp to_matchable(string) do
    case Version.Parser.parse_version(string) do
      {:ok, version} -> version
      :error -> raise InvalidVersionError, message: string
    end
  end


  """
  @spec compare(version, version) :: :gt | :eq | :lt
  def compare(version1, version2) do
    do_compare(to_matchable(version1, true), to_matchable(version2, true))
  end

  defp do_compare({major1, minor1, patch1, pre1, _}, {major2, minor2, patch2, pre2, _}) do
    cond do
      {major1, minor1, patch1} > {major2, minor2, patch2} -> :gt
      {major1, minor1, patch1} < {major2, minor2, patch2} -> :lt
