{"id":15310635,"url":"https://github.com/timvanscherpenzeel/detect-ua","last_synced_at":"2025-04-15T01:07:49.743Z","repository":{"id":40802981,"uuid":"168946608","full_name":"TimvanScherpenzeel/detect-ua","owner":"TimvanScherpenzeel","description":"A small user-agent detection library (1 kB).","archived":false,"fork":false,"pushed_at":"2023-01-06T01:51:22.000Z","size":1459,"stargazers_count":18,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T01:07:43.145Z","etag":null,"topics":["browser","deskop","detection","device","efficient","lightweight","mobile","small","tablet","user-agent"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimvanScherpenzeel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-03T13:12:20.000Z","updated_at":"2025-02-01T22:48:10.000Z","dependencies_parsed_at":"2023-02-05T02:01:39.948Z","dependency_job_id":null,"html_url":"https://github.com/TimvanScherpenzeel/detect-ua","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimvanScherpenzeel%2Fdetect-ua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimvanScherpenzeel%2Fdetect-ua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimvanScherpenzeel%2Fdetect-ua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimvanScherpenzeel%2Fdetect-ua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimvanScherpenzeel","download_url":"https://codeload.github.com/TimvanScherpenzeel/detect-ua/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986312,"owners_count":21194025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","deskop","detection","device","efficient","lightweight","mobile","small","tablet","user-agent"],"created_at":"2024-10-01T08:28:54.777Z","updated_at":"2025-04-15T01:07:49.722Z","avatar_url":"https://github.com/TimvanScherpenzeel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Detect user-agent\n\n![](http://img.badgesize.io/TimvanScherpenzeel/detect-ua/master/dist/detect-ua.cjs.js.svg?compression=gzip\u0026maxAge=60)\n[![npm version](https://badge.fury.io/js/detect-ua.svg)](https://badge.fury.io/js/detect-ua)\n\nA small user-agent detection library (1 kB).\n\nIs able to differentiate between mobile, tablet and desktop devices and finds your browser name and version.\n\n## Installation\n\nMake sure you have [Node.js](http://nodejs.org/) installed.\n\n```sh\n $ npm install detect-ua\n```\n\n## Usage\n\n```js\nimport { DetectUA } from 'detect-ua';\n\nconst device = new DetectUA();\n\nconsole.log(device.browser); // -\u003e { name: \"Chrome\", version: \"80.0\" }\nconsole.log(device.isMobile); // -\u003e false\nconsole.log(device.isTablet); // -\u003e false\nconsole.log(device.isDesktop); // -\u003e true\nconsole.log(device.isMacOS); // { version: \"10\" }\nconsole.log(device.isWindows); // -\u003e false\nconsole.log(device.isAndroid); // -\u003e false\nconsole.log(device.isiOS); // -\u003e false\n```\n\n## Development\n\n```sh\n$ yarn start\n\n$ yarn lint\n\n$ yarn test\n\n$ yarn build\n```\n\n## Licence\n\nMy work is released under the [MIT license](https://raw.githubusercontent.com/TimvanScherpenzeel/detect-ua/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvanscherpenzeel%2Fdetect-ua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimvanscherpenzeel%2Fdetect-ua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvanscherpenzeel%2Fdetect-ua/lists"}