Detect user-agent
A small user-agent detection library (1 kB).
Is able to differentiate between mobile, tablet and desktop devices and finds your browser name and version.
Installation
Make sure you have Node.js installed.
$ npm install detect-ua
Usage
; const device = ; console; // -> { name: "Chrome", version: "80.0" }console; // -> falseconsole; // -> falseconsole; // -> trueconsole; // { version: "10" }console; // -> falseconsole; // -> falseconsole; // -> false
Development
$ yarn start $ yarn lint $ yarn test $ yarn build
Licence
My work is released under the MIT license.