shebang-command
Get the command from a shebang
Last updated 2 months ago by kevva .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install shebang-command 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 2.0.0                                ...           latest (2 months ago)

4 Versions

  • 2.0.0                                ...           2 months ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |