{"id":13394179,"url":"https://github.com/bowser-js/bowser","last_synced_at":"2026-02-07T19:18:51.794Z","repository":{"id":1442700,"uuid":"1673025","full_name":"bowser-js/bowser","owner":"bowser-js","description":"a browser detector","archived":false,"fork":false,"pushed_at":"2024-08-21T12:10:03.000Z","size":4576,"stargazers_count":5569,"open_issues_count":96,"forks_count":488,"subscribers_count":106,"default_branch":"master","last_synced_at":"2025-05-09T11:16:34.357Z","etag":null,"topics":["browser","browser-detection","browser-detector","detect-browsers","device-detection","javascript","os-detection","user-agent-parser","useragent","useragentparser"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/bowser-js.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"lancedikson","open_collective":"lancedikson"}},"created_at":"2011-04-27T22:08:55.000Z","updated_at":"2025-05-06T19:42:32.000Z","dependencies_parsed_at":"2023-07-06T12:32:08.324Z","dependency_job_id":"4961b1e0-2f57-4a75-8e68-0cd7e53504e1","html_url":"https://github.com/bowser-js/bowser","commit_stats":{"total_commits":678,"total_committers":115,"mean_commits":5.895652173913043,"dds":0.556047197640118,"last_synced_commit":"8c489bd98b0128ce57edb4cbaf2a398170f2c466"},"previous_names":["ded/bowser","bowser-js/bowser","lancedikson/bowser"],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowser-js%2Fbowser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowser-js%2Fbowser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowser-js%2Fbowser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowser-js%2Fbowser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bowser-js","download_url":"https://codeload.github.com/bowser-js/bowser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253411617,"owners_count":21904154,"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","browser-detection","browser-detector","detect-browsers","device-detection","javascript","os-detection","user-agent-parser","useragent","useragentparser"],"created_at":"2024-07-30T17:01:11.573Z","updated_at":"2025-12-18T05:58:42.762Z","avatar_url":"https://github.com/bowser-js.png","language":"JavaScript","funding_links":["https://github.com/sponsors/lancedikson","https://opencollective.com/lancedikson","https://opencollective.com/bowser","https://opencollective.com/bowser/contribute","https://opencollective.com/bowser/organization/0/website","https://opencollective.com/bowser/organization/1/website","https://opencollective.com/bowser/organization/2/website","https://opencollective.com/bowser/organization/3/website","https://opencollective.com/bowser/organization/4/website","https://opencollective.com/bowser/organization/5/website","https://opencollective.com/bowser/organization/6/website","https://opencollective.com/bowser/organization/7/website","https://opencollective.com/bowser/organization/8/website","https://opencollective.com/bowser/organization/9/website"],"categories":["JavaScript"],"sub_categories":[],"readme":"## Bowser\nA small, fast and rich-API browser/platform/engine detector for both browser and node.\n- **Small.** Use plain ES5-version which is ~4.8kB gzipped.\n- **Optimized.** Use only those parsers you need — it doesn't do useless work.\n- **Multi-platform.** It's browser- and node-ready, so you can use it in any environment.\n\nDon't hesitate to support the project on Github or [OpenCollective](https://opencollective.com/bowser) if you like it ❤️ Also, contributors are always welcome!\n\n[![Financial Contributors on Open Collective](https://opencollective.com/bowser/all/badge.svg?label=financial+contributors)](https://opencollective.com/bowser) [![Build Status](https://travis-ci.org/bowser-js/bowser.svg?branch=master)](https://travis-ci.org/bowser-js/bowser/)  [![Greenkeeper badge](https://badges.greenkeeper.io/bowser-js/bowser.svg)](https://greenkeeper.io/)  [![Coverage Status](https://coveralls.io/repos/github/bowser-js/bowser/badge.svg?branch=master)](https://coveralls.io/github/bowser-js/bowser?branch=master) ![Downloads](https://img.shields.io/npm/dm/bowser)\n\n# Contents\n- [Overview](#overview)\n- [Use cases](#use-cases)\n\n# Overview\n\nThe library is made to help to detect what browser your user has and gives you a convenient API to filter the users somehow depending on their browsers. Check it out on this page: https://bowser-js.github.io/bowser-online/.\n\n### ⚠️ Version 2.0 breaking changes ⚠️\n\nVersion 2.0 has drastically changed the API. All available methods are on the [docs page](https://bowser-js.github.io/bowser/docs/).\n\n_For legacy code, check out the [1.x](https://github.com/bowser-js/bowser/tree/v1.x) branch and install it through `npm install bowser@1.9.4`._\n\n# Use cases\n\nFirst of all, require the library. This is a UMD Module, so it will work for AMD, TypeScript, ES6, and CommonJS module systems.\n\n```javascript\nconst Bowser = require(\"bowser\"); // CommonJS\n\nimport * as Bowser from \"bowser\"; // TypeScript\n\nimport Bowser from \"bowser\"; // ES6 (and TypeScript with --esModuleInterop enabled)\n```\n\nBy default, the exported version is the *ES5 transpiled version*, which **do not** include any polyfills.\n\nIn case you don't use your own `babel-polyfill` you may need to have pre-built bundle with all needed polyfills.\nSo, for you it's suitable to require bowser like this: `require('bowser/bundled')`.\nAs the result, you get a ES5 version of bowser with `babel-polyfill` bundled together.\n\nYou may need to use the source files, so they will be available in the package as well.\n\n## Browser props detection\n\nOften we need to pick users' browser properties such as the name, the version, the rendering engine and so on. Here is an example how to do it with Bowser:\n\n```javascript\nconst browser = Bowser.getParser(window.navigator.userAgent);\n\nconsole.log(`The current browser name is \"${browser.getBrowserName()}\"`);\n// The current browser name is \"Internet Explorer\"\n```\n\nor\n\n```javascript\nconst browser = Bowser.getParser(window.navigator.userAgent);\nconsole.log(browser.getBrowser());\n\n// outputs\n{\n  name: \"Internet Explorer\"\n  version: \"11.0\"\n}\n```\n\nor\n\n```javascript\nconsole.log(Bowser.parse(window.navigator.userAgent));\n\n// outputs\n{\n  browser: {\n    name: \"Internet Explorer\"\n    version: \"11.0\"\n  },\n  os: {\n    name: \"Windows\"\n    version: \"NT 6.3\"\n    versionName: \"8.1\"\n  },\n  platform: {\n    type: \"desktop\"\n  },\n  engine: {\n    name: \"Trident\"\n    version: \"7.0\"\n  }\n}\n```\n\n\n## Filtering browsers\n\nYou could want to filter some particular browsers to provide any special support for them or make any workarounds.\nIt could look like this:\n\n```javascript\nconst browser = Bowser.getParser(window.navigator.userAgent);\nconst isValidBrowser = browser.satisfies({\n  // declare browsers per OS\n  windows: {\n    \"internet explorer\": \"\u003e10\",\n  },\n  macos: {\n    safari: \"\u003e10.1\"\n  },\n\n  // per platform (mobile, desktop or tablet)\n  mobile: {\n    safari: '\u003e=9',\n    'android browser': '\u003e3.10'\n  },\n\n  // or in general\n  chrome: \"~20.1.1432\",\n  firefox: \"\u003e31\",\n  opera: \"\u003e=22\",\n\n  // also supports equality operator\n  chrome: \"=20.1.1432\", // will match particular build only\n\n  // and loose-equality operator\n  chrome: \"~20\",        // will match any 20.* sub-version\n  chrome: \"~20.1\"       // will match any 20.1.* sub-version (20.1.19 as well as 20.1.12.42-alpha.1)\n});\n```\n\nSettings for any particular OS or platform has more priority and redefines settings of standalone browsers.\nThus, you can define OS or platform specific rules and they will have more priority in the end.\n\nMore of API and possibilities you will find in the `docs` folder.\n\n### Browser names for `.satisfies()`\n\nBy default you are supposed to use the full browser name for `.satisfies`.\nBut, there's a short way to define a browser using short aliases. The full\nlist of aliases can be found in [the file](src/constants.js).\n\n## Similar Projects\n* [Kong](https://github.com/BigBadBleuCheese/Kong) - A C# port of Bowser.\n\n## Contributors\n\n### Code Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](.github/CONTRIBUTING.md)].\n\u003ca href=\"https://github.com/bowser-js/bowser/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/bowser/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\n### Financial Contributors\n\nBecome a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/bowser/contribute)]\n\n#### Individuals\n\n\u003ca href=\"https://opencollective.com/bowser\"\u003e\u003cimg src=\"https://opencollective.com/bowser/individuals.svg?width=890\"\u003e\u003c/a\u003e\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/bowser/contribute)]\n\n\u003ca href=\"https://opencollective.com/bowser/organization/0/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/bowser/organization/1/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/bowser/organization/2/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/bowser/organization/3/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/bowser/organization/4/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/bowser/organization/5/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/bowser/organization/6/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/bowser/organization/7/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/bowser/organization/8/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/bowser/organization/9/website\"\u003e\u003cimg src=\"https://opencollective.com/bowser/organization/9/avatar.svg\"\u003e\u003c/a\u003e\n\n## License\nLicensed as MIT. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowser-js%2Fbowser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbowser-js%2Fbowser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowser-js%2Fbowser/lists"}