{"id":17047572,"url":"https://github.com/duskload/mobile-device-detect","last_synced_at":"2025-04-04T18:08:59.389Z","repository":{"id":32575696,"uuid":"134942672","full_name":"duskload/mobile-device-detect","owner":"duskload","description":"Detect mobile device and its type.","archived":false,"fork":false,"pushed_at":"2023-04-03T03:57:15.000Z","size":448,"stargazers_count":197,"open_issues_count":23,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T17:11:14.242Z","etag":null,"topics":["angualrjs","detect","device","javascript","mobile","reactjs","useragent","vuejs"],"latest_commit_sha":null,"homepage":"","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/duskload.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":"2018-05-26T08:16:28.000Z","updated_at":"2025-03-20T12:40:40.000Z","dependencies_parsed_at":"2024-06-18T13:39:18.422Z","dependency_job_id":"094df830-f068-4dab-b2c9-19ad93562644","html_url":"https://github.com/duskload/mobile-device-detect","commit_stats":{"total_commits":14,"total_committers":4,"mean_commits":3.5,"dds":0.4285714285714286,"last_synced_commit":"b378dce64a1e9afa5c8e4e2f617ebe721543d4c7"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duskload%2Fmobile-device-detect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duskload%2Fmobile-device-detect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duskload%2Fmobile-device-detect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duskload%2Fmobile-device-detect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duskload","download_url":"https://codeload.github.com/duskload/mobile-device-detect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"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":["angualrjs","detect","device","javascript","mobile","reactjs","useragent","vuejs"],"created_at":"2024-10-14T09:49:45.042Z","updated_at":"2025-04-04T18:08:59.368Z","avatar_url":"https://github.com/duskload.png","language":"JavaScript","readme":"## mobile-device-detect\n\nHelpers for handling mobile devices in javascript.\n\n## Installation\n\nTo install, you can use npm or yarn:\n\n```\nnpm install mobile-device-detect --save\n\nor\n\nyarn add mobile-device-detect\n```\n\n## Usage\n\nImport any helper to your component, for example, in Vue.js:\n\n```html\n\u003cscript\u003e\nimport { isMobile } from 'mobile-device-detect';\nexport default {\n  name: 'HelloWorld',\n  data () {\n    return {\n      msg: isMobile ? 'Welcome to Your Vue.js mobile App!' : 'Welcome to Your Vue.js App'\n    }\n  }\n}\n\u003c/script\u003e\n\n```\npass it to template: \n\n```html\n\u003ctemplate\u003e\n  \u003cdiv class=\"hello\"\u003e\n    {{ msg }}\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\nFor react example, you can look into separated package [react-device-detect](https://github.com/duskload/react-device-detect)\n\n### Selectors\n\n| Property           | Return type     | Description                                                                            |\n| ------------------ | -------- | -------------------------------------------------------------------------------------- |\n| isMobile           | bool     | returns true if device type is `mobile` or `tablet`                                    |\n| isMobileOnly       | bool     | returns true if device type is `mobile`                                                |\n| isTablet           | bool     | returns true if device type is `tablet`                                                |\n| isBrowser          | bool     | returns true if device type is `browser`                                               |\n| isSmartTV          | bool     | returns true if device type is `smarttv`                                               |\n| isWearable         | bool     | returns true if device type is `wearable`                                              |\n| isConsole          | bool     | returns true if device type is `console`                                               |\n| isAndroid          | bool     | returns true if os type is `Android`                                                   |\n| isWinPhone         | bool     | returns true if os type is `Windows Phone`                                             |\n| isIOS              | bool     | returns true if os type is `iOS`                                                       |\n| isChrome           | bool     | returns true if browser is `Chrome`                                                    |\n| isFirefox          | bool     | returns true if browser is `Firefox`                                                   |\n| isSafari           | bool     | returns true if browser is `Safari`                                                    |\n| isOpera            | bool     | returns true if browser is `Opera`                                                     |\n| isIE               | bool     | returns true if browser is `Internet Explorer`                                         |\n| isEdge             | bool     | returns true if browser is `Edge` or `Edge Chromium`                                                     |\n| isYandex           | bool     | returns true if browser is `Yandex`                                                      |\n| isChromium         | bool     | returns true if browser is `Chromium`                                                  |\n| isMobileSafari     | bool     | returns true if browser is `Mobile Safari`                                             |\n| osVersion          | string   | returns os version (e.g 7 for `Windows` or 6 for `Android`)                            |\n| osName             | string   | returns os name (e.g `Windows`, `Android`)                                             |\n| fullBrowserVersion | string   | returns full browser version (e.g 65.0.3325.181 for `Chrome`)                          |\n| browserVersion     | string   | returns browser `major` version (e.g 65 in `Chrome` or 9 in `IE`)                      |\n| browserName        | string   | returns browser name                                                                   |\n| mobileVendor       | string   | returns mobile device vendor (e.g `LG`, `iPhone` etc)                                  |\n| mobileModel        | string   | returns mobile device model (e.g `Nexus 5`)                                            |\n| engineName         | string   | returns browser engine `name` (e.g `Gecko` for FF or `WebKit` for Chrome)              |\n| engineVersion      | string   | returns engine version                                                                 |\n| getUA              | string   | returns user agent                                                                     |\n| deviceType         | string   | returns device type (e.g `mobile` or `tablet`)  |\n| isIOS13            | boolean  | returns true/false if device is running on iOS13                                       |\n| isIPhone13         | boolean  | returns true/false if device is iPhone and running on iOS13                            |\n| isIPad13           | boolean  | returns true/false if device is iPad and running on iOS13                              |\n| isIPod13           | boolean  | returns true/false if device is iPod and running on iOS13                              |\n| isElectron         | boolean  | returns true/false if running on `Electron`                                            |\n| isEdgeChromium     | boolean  | returns true/false if browser is `Edge Chromium`                                       | \n| isLegacyEdge       | boolean  | returns true if browser is `Edge`                                                      |\n| isWindows          | boolean  | returns true/false if os is `Windows`                                                  |\n| isMacOs            | boolean  | returns true/false if os is `Mac OS`                                                   |\n| deviceDetect       | function | return data object which includes all data about device (e.g version, engine, os etc.) |\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduskload%2Fmobile-device-detect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduskload%2Fmobile-device-detect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduskload%2Fmobile-device-detect/lists"}