1.6.3 • Published 2 years ago

@financial-times/useragent_parser v1.6.3

Weekly downloads
18,956
License
MIT
Repository
github
Last release
2 years ago

User Agent parser in VCL & JS

This is the VCL & JS implementation of the 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:

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

const useragent = require('@financial-times/useragent_parser');

console.log(useragent(request.headers['user-agent']))
/*
  {
    family: 'chrome',
    major: 71,
    minor: 1,
    patch: 0
  }
*/
1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

3 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.1

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago