UAInspector v0.19.0 UAInspector View Source
UAInspector - User agent parser library
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 user agent
Parses a user agent without checking for bots
Checks if there is data to use in lookups
Reloads all databases
Link to this section Functions
Link to this function
bot?(ua) View Source
Checks if a user agent is a known bot.
Link to this function
hbbtv?(ua) View Source
Checks if a user agent is a HbbTV and returns its version if so.
Link to this function
parse(ua)
View Source
parse(ua)
View Source
parse(String.t() | nil) :: UAInspector.Result.t()
parse(String.t() | nil) :: UAInspector.Result.t()
Parses a user agent.
Link to this function
parse_client(ua)
View Source
parse_client(ua)
View Source
parse_client(String.t() | nil) :: UAInspector.Result.t()
parse_client(String.t() | nil) :: UAInspector.Result.t()
Parses a user agent without checking for bots.
Link to this function
ready?()
View Source
ready?()
View Source
ready?() :: boolean()
ready?() :: boolean()
Checks if there is data to use in lookups.
The check is done against all currently available internal data tables.
An empty database is any of the lookup modules considered to be "not ready".
Link to this function
reload()
View Source
reload()
View Source
reload() :: :ok
reload() :: :ok
Reloads all databases.