{"id":19119005,"url":"https://github.com/journy-io/user-agent-parser","last_synced_at":"2025-02-22T12:25:00.966Z","repository":{"id":57122191,"uuid":"421013504","full_name":"journy-io/user-agent-parser","owner":"journy-io","description":"📱 user-agent string parser","archived":false,"fork":false,"pushed_at":"2021-11-15T10:58:44.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T21:44:12.785Z","etag":null,"topics":["client-hints","device","header","nodejs","parser","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/journy-io.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":"2021-10-25T12:25:25.000Z","updated_at":"2022-08-18T09:15:29.000Z","dependencies_parsed_at":"2022-08-24T14:59:25.055Z","dependency_job_id":null,"html_url":"https://github.com/journy-io/user-agent-parser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"journy-io/package","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/journy-io%2Fuser-agent-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/journy-io%2Fuser-agent-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/journy-io%2Fuser-agent-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/journy-io%2Fuser-agent-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/journy-io","download_url":"https://codeload.github.com/journy-io/user-agent-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240172417,"owners_count":19759557,"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":["client-hints","device","header","nodejs","parser","user-agent"],"created_at":"2024-11-09T05:08:18.267Z","updated_at":"2025-02-22T12:25:00.947Z","avatar_url":"https://github.com/journy-io.png","language":"TypeScript","readme":"[![journy.io](https://raw.githubusercontent.com/journy-io/brand/main/githubbanner.png)](https://journy.io/?utm_source=github\u0026utm_content=readme-user-agent-parser)\n\n# User Agent Parser\n\n![npm](https://img.shields.io/npm/v/@journyio/user-agent-parser?color=%234d84f5\u0026style=flat-square)\n[![npm downloads](https://img.shields.io/npm/dm/@journyio/user-agent-parser?style=flat-square)](https://www.npmjs.com/package/@journyio/user-agent-parser)\n\nInspired by [faisalman/ua-parser-js](https://github.com/faisalman/ua-parser-js).\n\nIn fact, most code is copy and 🍝. We've added TypeScript types and adopted modern syntax.\n\nWe decided to publish our own version because the package was recently [highjacked](https://github.com/faisalman/ua-parser-js/issues/536).\n\nWhy choose this package over [faisalman/ua-parser-js](https://github.com/faisalman/ua-parser-js)?\n\n* Modern syntax\n* TypeScript types\n* Written in TypeScript\n* Not much of a target because less popular\n* Drop-in replacement\n\nIs this package maintained?\n\nYes and no, we won't add new devices or browsers but will fix any bugs. We should adopt [client hints](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-client-hints-06) and use this library as a fallback.\n\n## 💾 Installation\n\nYou can use your package manager (`npm` or `yarn`) to install:\n\n```bash\nnpm install --save @journyio/user-agent-parser\n```\nor\n```bash\nyarn add @journyio/user-agent-parser\n```\n\n## 🔌 Getting started\n\n```tsx\nimport { parse } from \"@journyio/user-agent-parser\";\n\nconst result = parse(\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome Safari/537.36\");\n\n/*\n{\n  browser: { name: 'Chrome Headless', version: undefined, major: undefined },\n  engine: { name: 'WebKit', version: '537.36' },\n  os: { name: 'Linux', version: 'x86_64' },\n  device: { vendor: undefined, model: undefined, type: undefined },\n  cpu: { architecture: 'amd64' }\n}*/\n```\n\n## 💯 Tests\n\nTo run the tests:\n\n```bash\nnpm run test\n```\n\n## 🔒 Security\n\nIf you discover any security related issues, please email security at journy io instead of using the issue tracker.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjourny-io%2Fuser-agent-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjourny-io%2Fuser-agent-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjourny-io%2Fuser-agent-parser/lists"}