{"id":16326697,"url":"https://github.com/chrisyip/user-agent","last_synced_at":"2025-07-05T09:04:45.726Z","repository":{"id":6582971,"uuid":"7825291","full_name":"chrisyip/user-agent","owner":"chrisyip","description":"A tiny user agent parser.","archived":false,"fork":false,"pushed_at":"2013-01-25T19:30:57.000Z","size":112,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T22:12:17.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/chrisyip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-25T17:50:52.000Z","updated_at":"2014-08-18T18:14:01.000Z","dependencies_parsed_at":"2022-09-15T16:22:39.515Z","dependency_job_id":null,"html_url":"https://github.com/chrisyip/user-agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chrisyip/user-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fuser-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fuser-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fuser-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fuser-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisyip","download_url":"https://codeload.github.com/chrisyip/user-agent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fuser-agent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263715325,"owners_count":23500241,"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":[],"created_at":"2024-10-10T23:09:19.830Z","updated_at":"2025-07-05T09:04:45.667Z","avatar_url":"https://github.com/chrisyip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# user-agent.js\n\nA tiny user agent parser.\n\n## Usage\n\nLink script file or copy code to your page, then run:\n\n    var ua = agent.parse(navigator.userAgent)\n\niPod:\n\n    // \"Mozilla/5.0 (iPod; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3\"\n    console.log(ua)\n    /*\n    {\n      browser: \"safari\",\n      core: \"webkit\",\n      deveice: \"mobile\",\n      platform: \"ipod\",\n      safari: 5.1,\n      toString: function () {...}, // ipod webkit safari mobile 5.1\n      version: \"5.1\"\n    }\n    */\n\nSafari on Mac:\n\n    // \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17\"\n    console.log(ua)\n    /*\n    {\n      browser: \"safari\",\n      core: \"webkit\",\n      deveice: \"desktop\",\n      platform: \"mac\",\n      safari: 6,\n      toString: function () {...}, // mac webkit safari desktop 6.0.2\n      version: \"6.0.2\"\n    }\n    */\n\nIE on Windows (pretended by Safari):\n\n    // \"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)\"\n    console.log(ua)\n    /*\n    {\n      browser: \"msie\",\n      core: \"trident\",\n      deveice: \"desktop\",\n      msie: 9,\n      platform: \"windows\",\n      toString: function () {...}, // windows trident msie desktop 9.0\n      version: \"9.0\"\n    }\n    */\n\nChrome on Mac:\n\n    // \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17\"\n    console.log(ua)\n    /*\n    {\n      browser: \"chrome\",\n      chrome: 24,\n      core: \"webkit\",\n      deveice: \"desktop\",\n      platform: \"mac\",\n      toString: function () {...}, // mac webkit chrome desktop 24.0.1312.56\n      version: \"24.0.1312.56\"\n    }\n    */\n\nBlackBerry PlayBook (pretended by Chrome):\n\n    // \"Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML, like Gecko) Version/7.2.1.0 Safari/536.2+\"\n    console.log(ua)\n    /*\n    {\n      browser: \"safari\",\n      core: \"webkit\",\n      deveice: \"mobile\",\n      platform: \"playbook\",\n      safari: 7.2\n      toString: function () {...}, // playbook webkit safari mobile 7.2.1.0\n      version: \"7.2.1.0\"\n    }\n    */\n\nFirefox on Mac\n\n    // \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:18.0) Gecko/20100101 Firefox/18.0\"\n    console.log(ua)\n    /*\n    {\n      browser: \"firefox\",\n      core: \"gecko\",\n      deveice: \"desktop\",\n      firefox: 18,\n      platform: \"mac\",\n      toString: function () {...}, // playbook webkit safari mobile 7.2.1.0\n      version: \"18.0\"\n    }\n    */\n\nWindows Phone (pretended by Chrome)\n\n    // \"Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG; SGH-i917)\"\n    console.log(ua)\n    /*\n    {\n      browser: \"iemobile\",\n      core: \"trident\",\n      deveice: \"mobile\",\n      iemobile: 9,\n      platform: \"windows_phone\",\n      toString: function () {...}, // \"windows_phone trident iemobile mobile 9.0\"\n      version: \"9.0\"\n    }\n    */\n\n## License\n\n[MIT license](https://raw.github.com/ChrisYip/user-agent/master/LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisyip%2Fuser-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisyip%2Fuser-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisyip%2Fuser-agent/lists"}