1.0.1 • Published 8 years ago
has-shebang v1.0.1
has-shebang
check if string or file contains shebang
Made with ❤ at @outlandish
Install
npm install --save has-shebangyarn add has-shebangImport
// 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') //=> falseContributing
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