Package Exports
- to-executable-name
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (to-executable-name) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
to-executable-name
Append .exe
to a given string if the program is running on a Windows environment
const toExecutableName = require('to-executable-name');
// On Windows
toExecutableName('node'); //=> 'node.exe'
// Otherwise
toExecutableName('node'); //=> 'node'
Installation
npm install to-executable-name
API
const toExecutableName = require('to-executable-name');
toExecutableName(binName [, option])
binName: String
option: Object
Return: String
options.win32Ext
Type: String
Default: .exe
A file extension that will be appended to the string on Windows.
// On Windows
toExecutableName('foo'); //=> 'foo.exe'
toExecutableName('foo', {win32Ext: '.bat'}); //=> 'foo.bat'
License
Copyright (c) 2015 - 2017 Shinnosuke Watanabe
Licensed under the MIT License.