2023-12-03 16:59:28 +04:00
|
|
|
# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command)
|
|
|
|
|
|
|
|
> Get the command from a shebang
|
|
|
|
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
```
|
2024-01-06 20:33:49 +04:00
|
|
|
$ npm install shebang-command
|
2023-12-03 16:59:28 +04:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```js
|
|
|
|
const shebangCommand = require('shebang-command');
|
|
|
|
|
|
|
|
shebangCommand('#!/usr/bin/env node');
|
|
|
|
//=> 'node'
|
|
|
|
|
|
|
|
shebangCommand('#!/bin/bash');
|
|
|
|
//=> 'bash'
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## API
|
|
|
|
|
|
|
|
### shebangCommand(string)
|
|
|
|
|
|
|
|
#### string
|
|
|
|
|
|
|
|
Type: `string`
|
|
|
|
|
|
|
|
String containing a shebang.
|