get-bin

1.0.0 • Public • Published

get-bin NPM version NPM downloads Build Status

Get the name of the executable.

Install

$ npm install --save get-bin

Usage

const getBin = require('get-bin')
 
getBin().then(bin => {
  console.log(bin)
  //=> ['cli-name']
})
 
// if no `bin` set in `package.json`
getBin().then()
//=> null
 
// for a specific path
getBin({cwd: '/path/to/somewhere'}).then()
 
// in sync mode
getBin.sync()

API

getBin([options])

options

cwd

Type: string
Default: Path.dirname(module.parent.filename)

The path a package.json relative to.

.sync

Sync mode.

License

MIT © EGOIST

Readme

Keywords

Package Sidebar

Install

npm i get-bin

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kchan