{"id":21047468,"url":"https://github.com/niklashigi/gamepad-info","last_synced_at":"2026-04-28T14:07:49.792Z","repository":{"id":57244273,"uuid":"117892668","full_name":"niklashigi/gamepad-info","owner":"niklashigi","description":"Retrieve information about a gamepad","archived":false,"fork":false,"pushed_at":"2019-12-29T15:29:45.000Z","size":149,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T17:52:07.514Z","etag":null,"topics":["gamepad","gamepad-api","npm-package","parser"],"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/niklashigi.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":"2018-01-17T21:05:56.000Z","updated_at":"2023-09-08T17:35:21.000Z","dependencies_parsed_at":"2022-09-01T04:23:12.119Z","dependency_job_id":null,"html_url":"https://github.com/niklashigi/gamepad-info","commit_stats":null,"previous_names":["shroudedcode/gamepad-info"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklashigi%2Fgamepad-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklashigi%2Fgamepad-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklashigi%2Fgamepad-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklashigi%2Fgamepad-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niklashigi","download_url":"https://codeload.github.com/niklashigi/gamepad-info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243491503,"owners_count":20299321,"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":["gamepad","gamepad-api","npm-package","parser"],"created_at":"2024-11-19T14:37:13.482Z","updated_at":"2025-12-29T14:16:42.463Z","avatar_url":"https://github.com/niklashigi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gamepad-info\n\n\u003e Retrieve information about a gamepad\n\n[![build status][build-badge]][build-link]\n[![npm][npm-badge]][npm-link]\n\n## Installation\n\n```\n$ npm install gamepad-info\n```\n\n## Example\n\n```js\nconst getGamepadInfo = require('gamepad-info')\n\nconst gamepad = navigator.getGamepads()[0]\nconst gamepadName = getGamepadInfo(gamepad).name\nconsole.log(`Your gamepad is called \"${gamepadName}\".`)\n```\n\n## API\n\n### getGamepadInfo(input)\n\nTakes in a [`Gamepad` instance][gamepad-instance] or a [`gamepad.id` string][gamepad-id-string] and returns an object like this:\n\n```js\n{ name: 'Xbox 360 Wireless Receiver',\n  vendorId: '045e',\n  vendor: 'microsoft',\n  productId: '0719' }\n```\n\n* `name` is the user-friendly name of the gamepad.\n* `vendorId` is the vendor's [USB vendor ID][usb-vendor-id].\n* `vendor` is the vendor's name and only available for [some vendors](vendors.js).\n* `productId` is the ID of the product and might vary between browsers.\n\n## License\n\nMIT © [Niklas Higi](https://shroudedcode.com)\n\n[gamepad-instance]: https://developer.mozilla.org/en-US/docs/Web/API/Gamepad\n[gamepad-id-string]: https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/id\n[usb-vendor-id]: https://en.wikipedia.org/wiki/USB_Implementers_Forum#Obtaining_a_vendor_ID\n\n[build-badge]: https://img.shields.io/travis/shroudedcode/gamepad-info.svg?style=flat-square\n[build-link]: https://travis-ci.org/shroudedcode/gamepad-info\n\n[npm-badge]: https://img.shields.io/npm/v/gamepad-info.svg?style=flat-square\n[npm-link]: https://www.npmjs.com/package/gamepad-info\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklashigi%2Fgamepad-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklashigi%2Fgamepad-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklashigi%2Fgamepad-info/lists"}