UAInspector.Util.OS

Utility methods for operating system lookups.

Source

Summary

desktop_only?(name)

Checks whether an operating system is treated as “desktop only”

family(short_code)

Returns the OS family for an OS short code

proper_case(os)

Returns the proper case version of a downcase os name

Functions

desktop_only?(name)

Specs:

  • desktop_only?(name :: String.t) :: boolean

Checks whether an operating system is treated as “desktop only”.

Source
family(short_code)

Specs:

Returns the OS family for an OS short code.

Unknown short codes return nil as their family.

Source
proper_case(os)

Specs:

Returns the proper case version of a downcase os name.

Unknown names are returned unmodified.

Examples

iex> proper_case("debian")
"Debian"

iex> proper_case("--UnKnOnWn--")
"--UnKnOnWn--"
Source