UAInspector v0.19.0 UAInspector.Parser behaviour View Source

Parser module to call individual data parsers and aggregate the results.

Link to this section Summary

Functions

Checks if a user agent is a known bot

Checks if a user agent is a HbbTV and returns its version if so

Parses a given user agent string

Parses a user agent without checking for bots

Callbacks

Parses information from a user agent

Link to this section Functions

Checks if a user agent is a known bot.

Link to this function

hbbtv?(ua) View Source
hbbtv?(String.t()) :: false | String.t()

Checks if a user agent is a HbbTV and returns its version if so.

Parses a given user agent string.

Parses a user agent without checking for bots.

Link to this section Callbacks

Link to this callback

parse(ua) View Source
parse(ua :: String.t()) :: atom() | map()

Parses information from a user agent.

Returns :unknown if no information is not found in the database.

iex> parse("--- undetectable ---")
:unknown