shebang-command

Get the command from a shebang

MIT 4 个版本
安装
npm install shebang-command
yarn add shebang-command
pnpm add shebang-command
bun add shebang-command
README

shebang-command Build Status

Get the command from a shebang

Install

$ npm install shebang-command

Usage

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.

版本列表
2.0.0 2019-09-06
1.2.0 2016-09-22
1.1.0 2016-04-07
1.0.0 2015-12-04