has-shebang
v1.0.1
Published
check if string or file contains shebang
Downloads
3
Readme
has-shebang
check if string or file contains shebang
Made with ❤ at @outlandish
Install
npm install --save has-shebang
yarn add has-shebang
Import
// ES2015
import hasShebang from 'has-shebang'
// CommonJS
var hasShebang = require('has-shebang')
Usage
hasShebang(input) : Boolean
Check if a file or string has a shebang.
- input {String} (required) string to check or path to file
Returns true if has shebang, false otherwise.
Example
import hasShebang from 'has-shebang'
hasShebang('#!/usr/bin/env/node') //=> true
hasShebang('#spongebob') //=> false
Contributing
All pull requests and issues welcome!
If you're not sure how, check out the great video tutorials on egghead.io!
License
MIT © Sam Gluck