You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 line
495 B

4 年之前
  1. # shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command)
  2. > Get the command from a shebang
  3. ## Install
  4. ```
  5. $ npm install shebang-command
  6. ```
  7. ## Usage
  8. ```js
  9. const shebangCommand = require('shebang-command');
  10. shebangCommand('#!/usr/bin/env node');
  11. //=> 'node'
  12. shebangCommand('#!/bin/bash');
  13. //=> 'bash'
  14. ```
  15. ## API
  16. ### shebangCommand(string)
  17. #### string
  18. Type: `string`
  19. String containing a shebang.