Module: Boechat::Internal::Constants

Defined in:
lib/boechat/internal/constants.rb

Overview

A list of constants you can use to avoid memory allocations or identity checks.

Examples:

Just include this module to your class or module

class Foo
  include Boechat::Internal::Constants

  def call(value = EMPTY_ARRAY)
     value.map(&:to_s)
  end
end

Constant Summary collapse

REGEX_SEMVER_FORMAT =

Source: github.com/semver/semver/issues/232 rubocop:disable Metrics/LineLength

/^(v\d*|0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/