{"id":20882928,"url":"https://github.com/heineiuo/react-platform","last_synced_at":"2026-04-13T17:31:30.528Z","repository":{"id":66092611,"uuid":"91756598","full_name":"heineiuo/react-platform","owner":"heineiuo","description":"\u003cPlatform\u003e for browser. Move to ——→","archived":false,"fork":false,"pushed_at":"2017-06-14T13:46:13.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T09:48:59.555Z","etag":null,"topics":["platform","react","ua-parser-js"],"latest_commit_sha":null,"homepage":"https://github.com/heineiuo/react-web/tree/master/packages/platform","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heineiuo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-05-19T02:23:17.000Z","updated_at":"2017-08-03T08:55:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ffa4c66-f469-4b01-a335-7dbf951d2cb7","html_url":"https://github.com/heineiuo/react-platform","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/heineiuo/react-platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heineiuo%2Freact-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heineiuo%2Freact-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heineiuo%2Freact-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heineiuo%2Freact-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heineiuo","download_url":"https://codeload.github.com/heineiuo/react-platform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heineiuo%2Freact-platform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31762474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["platform","react","ua-parser-js"],"created_at":"2024-11-18T07:34:00.745Z","updated_at":"2026-04-13T17:31:30.506Z","avatar_url":"https://github.com/heineiuo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @react-shared/platform\n\n## Install\n\n```bash\nyarn add @react-shared/platform # or npm install @react-shared/platform\n```\n\n## Usage\n\n### method\n```javascript\nimport Platform from '@react-shared/platform'\n\nPlatform.OS // OS name, Mac OS\nPlatform.OSVersion // OS version, 10.11\nPlatform.Browser // Browser name, Chrome\nPlatform.BrowserVersion // Browser Version\nPlatform.Engine // browser engine name\n// and ...\nPlatform.CPU\nPlatform.DeviceType\nPlatform.DeviceModel\nPlatform.DeviceVendor\nPlatform.UA\n\n```\n\n### component\n\n```javascript\nimport React, {Component} from 'react'\nimport Platform from '@react-shared/platform'\n\nclass App extends Component {\n  render() {\n    return (\n      \u003cPlatform rules={{OS: 'Mac OS'}}\u003e\n        Only Mac OS computer will see this text.\n      \u003c/Platform\u003e\n    )\n  }\n}\n\n/**\n * use function children\n * *important* in this way, prop 'rules' will not work\n */\nclass App2 extends Component {\n  render() {\n    return (\n      \u003cPlatform\u003e\n        {props =\u003e {\n          return (\n            \u003cdiv\u003e\n              OS: {props.OS},\n              OSVersion: {props.OSVersion},\n              Browser: {props.Browser},\n              BrowserVersion: {props.BrowserVersion},\n              DeviceType: {props.DeviceType},\n              DeviceModel: {props.DeviceModel},\n              DeviceVendor: {props.DeviceVendor},\n              Engine: {props.Engine},\n              EngineVersion: {props.EngineVersion},\n              CPU: {props.CPU},\n              UA: {props.UA},\n            \u003c/div\u003e\n          )\n        }}\n      \u003c/Platform\u003e\n    )\n  }\n}\n```\n\n\n#### props\n\n* *rules*\n* *className* only work when children is string or array\n* *style* only work when children is string or array\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheineiuo%2Freact-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheineiuo%2Freact-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheineiuo%2Freact-platform/lists"}