{"id":17472830,"url":"https://github.com/shinnn/different-platform","last_synced_at":"2026-04-30T00:31:43.798Z","repository":{"id":65997836,"uuid":"97824753","full_name":"shinnn/different-platform","owner":"shinnn","description":"Return 'linux' on Windows, otherwise return 'win32'","archived":false,"fork":false,"pushed_at":"2019-02-25T11:58:45.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-07T09:22:03.135Z","etag":null,"topics":["cross-platform-development","javascript","nodejs","platform"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.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":"2017-07-20T10:53:59.000Z","updated_at":"2019-02-25T11:58:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"701f9dc4-b0ea-43c1-a261-f169ffa3da94","html_url":"https://github.com/shinnn/different-platform","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fdifferent-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fdifferent-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fdifferent-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fdifferent-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/different-platform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245991554,"owners_count":20706126,"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":["cross-platform-development","javascript","nodejs","platform"],"created_at":"2024-10-18T17:37:54.492Z","updated_at":"2026-04-30T00:31:38.781Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# different-platform\n\n[![npm version](https://img.shields.io/npm/v/different-platform.svg)](https://www.npmjs.com/package/different-platform)\n[![Build Status](https://travis-ci.com/shinnn/different-platform.svg?branch=master)](https://travis-ci.com/shinnn/different-platform)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/different-platform.svg)](https://coveralls.io/github/shinnn/different-platform?branch=master)\n\nReturn `'linux'` on Windows, otherwise return `'win32'`\n\n```javascript\nconst differentPlatform = require('different-platform');\n\n// on Windows\ndifferentPlatform(); //=\u003e 'linux'\n\n// on a non-Windows OS, for example Linux and macOS\ndifferentPlatform(); //=\u003e 'win32'\n```\n\nUseful for testing the behavior of [`process.platform`](https://nodejs.org/api/process.html#process_process_platform)-dependent code on the two platforms in combination with [pretend-platform](https://github.com/shinnn/pretend-platform).\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install different-platform\n```\n\n## API\n\n```javascript\nconst differentPlatform = require('different-platform');\n```\n\n### differentPlatform()\n\nReturn: `string` (`'linux'` when `process.platform` equals to `'win32'`, otherwise `'win32'`)\n\n## License\n\n[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fdifferent-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Fdifferent-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fdifferent-platform/lists"}