package
Get the command from a shebang
npm install shebang-commandGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Get the command from a shebang
$ npm install shebang-commandconst shebangCommand = require('shebang-command');
shebangCommand('#!/usr/bin/env node');
//=> 'node'
shebangCommand('#!/bin/bash');
//=> 'bash'Type: string
String containing a shebang.
Estimated unpacked size across 2 packages.
5.7 kB
Includes dependencies.