Module

base/detection

This module exports a common detection function that performs the necessary checks to ensure the code is being executed on a browsers before execution of the userAgent test for the platforms that depends on it.

Optionally, a pre-check can be passed in as the second parameters, which will be executed before the am-I-running-on-a-browser test. One of the use case is forcing all non-browser environment to use the workstation device package.