1 | [LiteJS]: https://www.litejs.com/
|
2 | [npm package]: https://www.npmjs.com/package/@litejs/ua
|
3 | [GitHub repo]: https://github.com/litejs/ua
|
4 |
|
5 | [size]: https://packagephobia.now.sh/badge?p=@litejs/ua
|
6 | [size-link]: https://packagephobia.now.sh/result?p=@litejs/ua
|
7 | [test]: https://github.com/litejs/ua/workflows/Test/badge.svg?branch=master
|
8 | [test-link]: https://github.com/litejs/ua/actions?query=workflow%3ATest
|
9 |
|
10 | @litejs/ua – [![test][test]][test-link] [![size][size]][size-link]
|
11 | ==========
|
12 |
|
13 |
|
14 | Simple User-Agent parser for statistical purposes in 2KB minified.
|
15 |
|
16 | ```javascript
|
17 | var ua = require("@litejs/ua").ua
|
18 |
|
19 | ua("Mozilla/5.0 (Mobile; rv:18.1) Gecko/18.1 Firefox/18.1")
|
20 | // {os:{name:"Firefox OS",ver:"1",full:"1.1"},browser:{name:"Firefox",ver:"18",full:"18.1"},device:"Mobile"}
|
21 | ```
|
22 |
|
23 |
|
24 | ## External links
|
25 |
|
26 | [GitHub repo][] |
|
27 | [npm package][] |
|
28 | [Coveralls code coverage](https://coveralls.io/github/litejs/ua)
|
29 |
|
30 |
|
31 | ## Licence
|
32 |
|
33 | Copyright (c) Lauri Rooden <lauri@rooden.ee>
|
34 | [The MIT License](http://lauri.rooden.ee/mit-license.txt)
|
35 |
|
36 |
|