{"id":17472618,"url":"https://github.com/shinnn/to-executable-name","last_synced_at":"2025-03-28T07:45:50.475Z","repository":{"id":31422491,"uuid":"34985953","full_name":"shinnn/to-executable-name","owner":"shinnn","description":"Append .exe to a given string if the program is running on a Windows environment","archived":false,"fork":false,"pushed_at":"2019-01-11T22:27:33.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T10:05:01.949Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npm.runkit.com/to-executable-name","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}},"created_at":"2015-05-03T12:53:58.000Z","updated_at":"2019-02-17T08:19:38.000Z","dependencies_parsed_at":"2022-09-22T16:41:44.179Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/to-executable-name","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fto-executable-name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fto-executable-name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fto-executable-name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fto-executable-name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/to-executable-name/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":[],"created_at":"2024-10-18T17:29:08.943Z","updated_at":"2025-03-28T07:45:50.453Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# to-executable-name\n\n[![npm version](https://img.shields.io/npm/v/to-executable-name.svg)](https://www.npmjs.com/package/to-executable-name)\n[![Build Status](https://travis-ci.com/shinnn/to-executable-name.svg?branch=master)](https://travis-ci.com/shinnn/to-executable-name)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/to-executable-name.svg)](https://coveralls.io/github/shinnn/to-executable-name)\n\nAppend `.exe` to a given string if the program is running on a [Windows](https://www.microsoft.com/windows) environment\n\n```javascript\nconst toExecutableName = require('to-executable-name');\n\n// On Windows\ntoExecutableName('node'); //=\u003e 'node.exe'\n\n// Otherwise\ntoExecutableName('node'); //=\u003e 'node'\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install to-executable-name\n```\n\n## API\n\n```javascript\nconst toExecutableName = require('to-executable-name');\n```\n\n### toExecutableName(*binName* [, *option*])\n\n*binName*: `string`  \n*option*: `Object`  \nReturn: `string`\n\n#### options.win32Ext\n\nType: `string`  \nDefault: `.exe`\n\nA file extension that will be appended to the string on Windows.\n\n```javascript\n// On Windows\n\ntoExecutableName('foo'); //=\u003e 'foo.exe'\ntoExecutableName('foo', {win32Ext: '.bat'}); //=\u003e 'foo.bat'\n```\n\n## License\n\n[ISC License](./LICENSE) © 2017 - 2019 Shinnosuke Watanabe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fto-executable-name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Fto-executable-name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fto-executable-name/lists"}