# useragent_parser **Repository Path**: mirrors_Financial-Times/useragent_parser ## Basic Information - **Project Name**: useragent_parser - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-07-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # User Agent parser in VCL & JS This is the VCL & JS implementation of the [ua-parser](https://github.com/tobie/ua-parser) # Usage ## Updating `uap-core` definitions are, by default, compiled and included in the package. Updating `uap-core` is done every day via a GitHub Action. # Example in VCL For a request which was the user-agent Chrome 71.1: ```vcl import ua_parser; sub vcl_recv { call useragent_parser; # req.http.useragent_parser_family = "chrome"; # req.http.useragent_parser_major = "71"; # req.http.useragent_parser_minor = "1"; # req.http.useragent_parser_patch = "0"; } ``` # Example in JS ```js const useragent = require('@financial-times/useragent_parser'); console.log(useragent(request.headers['user-agent'])) /* { family: 'chrome', major: 71, minor: 1, patch: 0 } */ ```