module Browser::DetectVersion

Direct including types

Defined in:

browser/check_version.cr

Constant Summary

EXPECTED_RE = /\s*(?<operator>(\~>|<\~|=<|>=|<|>))?\s*(?<version>(\S)+)/

Instance Method Summary

Instance Method Detail

def check_version?(actual_version, expected_version) #

Lastly, handles incorrectly formatted versions by returning false

check_version?("1.2.3", ">= 1.2.3.Chromium.2.1") # => false


@param [String] actual version
@param [String] expected version
@return [Boolean] whether the actual version matches the expected version

[View source]