foundation-filters.useragentfilter
Home > @genesislcap/foundation-filters > userAgentFilter
userAgentFilter() function
UserAgent client filter function.
Signature:
export declare function userAgentFilter(browsers?: string[], devices?: string[], oss?: string[], ua?: string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
browsers | string[] | (Optional) Browser names to target. |
devices | string[] | (Optional) Device types to target. |
oss | string[] | (Optional) Operating system names to target. |
ua | string | (Optional) User-agent string (required in nodejs environment). |
Returns:
boolean
Remarks
See https://github.com/faisalman/ua-parser-js for more information.