2.0.0 • Published 7 years ago

to-executable-name v2.0.0

Weekly downloads
15
License
ISC
Repository
github
Last release
7 years ago

to-executable-name

npm version Build Status Build status Coverage Status

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

Use npm.

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

ISC License © 2017 Shinnosuke Watanabe

2.0.0

7 years ago

2.0.0-2

7 years ago

2.0.0-1

7 years ago

2.0.0-0

7 years ago

1.1.1

7 years ago

1.1.0

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago