JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 111
  • Score
    100M100P100Q72997F
  • License MIT

Append .exe to a given string if the program is running on a Windows environment

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

NPM version Build Status Build status Coverage Status devDependencies 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

Copyright (c) 2015 - 2016 Shinnosuke Watanabe

Licensed under the MIT License.