{"id":23274049,"url":"https://github.com/thillmann/bowser-jr","last_synced_at":"2025-08-21T06:31:33.108Z","repository":{"id":37432943,"uuid":"496566692","full_name":"thillmann/bowser-jr","owner":"thillmann","description":"A lightweight browser detector utility","archived":false,"fork":false,"pushed_at":"2023-07-29T12:04:50.000Z","size":163,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-02T12:54:55.317Z","etag":null,"topics":["browser-detection","browser-detector","detect-browser","device-detection","javascript","os-detection","typescript","user-agent-parser","useragent","useragentparser"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thillmann.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-26T09:57:51.000Z","updated_at":"2022-11-09T07:14:12.000Z","dependencies_parsed_at":"2024-06-21T12:56:18.157Z","dependency_job_id":"343181b5-eb2c-41f2-9c92-899f0d604fa0","html_url":"https://github.com/thillmann/bowser-jr","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.04347826086956519,"last_synced_commit":"6b30ed75c6faebda51df4f9474da9154af8a38ed"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thillmann%2Fbowser-jr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thillmann%2Fbowser-jr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thillmann%2Fbowser-jr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thillmann%2Fbowser-jr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thillmann","download_url":"https://codeload.github.com/thillmann/bowser-jr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230494926,"owners_count":18235047,"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-detection","browser-detector","detect-browser","device-detection","javascript","os-detection","typescript","user-agent-parser","useragent","useragentparser"],"created_at":"2024-12-19T20:11:45.172Z","updated_at":"2024-12-19T20:11:45.716Z","avatar_url":"https://github.com/thillmann.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bowser Jr.\n\nA small, lightweight and *composable* browser detection utility heavily inspired by [`bowser`](https://github.com/lancedikson/bowser).\n\n[![Unit Tests](https://github.com/thillmann/bowser-jr/actions/workflows/test.yaml/badge.svg)](https://github.com/thillmann/bowser-jr/actions/workflows/test.yaml)\n\n## Installation\n\nInstall it using your favourite package manager:\n\n```bash\n$ npm install bowser-jr\n# or\n$ yarn add bowser-jr\n# or\n$ pnpm add bowser-jr\n```\n\n## Usage\n\nNow just import `getParser` and the `parsers` you need:\n\n```ts\nimport { getParser } from 'bowser-jr';\nimport { getBrowserName, browserParser } from 'bowser-jr/browser';\n\nconst parser = getParser(window.navigator.userAgent, { use: [browserParser] });\n\nconsole.log(getBrowserName(parser)); // outputs `Firefox`\n```\n\n### Using multiple parsers\n\nYou can use multiple parsers to extract more information from the user agent:\n\n```ts\nimport { getParser } from 'bowser-jr';\nimport { browserParser } from 'bowser-jr/browser';\nimport { engineParser } from 'bowser-jr/engine';\nimport { osParser } from 'bowser-jr/os';\nimport { platformParser } from 'bowser-jr/platform';\n\nconst parser = getParser(window.navigator.userAgent, {\n    use: [browserParser, engineParser, osParser, platformParser],\n});\n\nconsole.log(parser.getResult());\n```\n\n### Bowser compat utilities\n\n`bowser-jr` also comes with a compatibility utility for [`bowser`](https://github.com/lancedikson/bowser) to make adoption a little easier:\n\n```ts\nimport BowserCompat from 'bowser-jr/compat';\n\nconst browser = BowserCompat.getParser(window.navigator.userAgent);\nconsole.log(browser.getBrowser());\n\n// outputs\n{\n  name: \"Internet Explorer\"\n  version: \"11.0\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthillmann%2Fbowser-jr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthillmann%2Fbowser-jr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthillmann%2Fbowser-jr/lists"}