stale/node_modules/shebang-regex
Danny McCormick dc7133054e Add most recent action 2019-08-06 16:25:08 -04:00
..
index.js Initial import 2019-08-03 21:34:59 -04:00
license Initial import 2019-08-03 21:34:59 -04:00
package.json Add most recent action 2019-08-06 16:25:08 -04:00
readme.md Initial import 2019-08-03 21:34:59 -04:00

readme.md

shebang-regex Build Status

Regular expression for matching a shebang

Install

$ npm install --save shebang-regex

Usage

var shebangRegex = require('shebang-regex');
var str = '#!/usr/bin/env node\nconsole.log("unicorns");';

shebangRegex.test(str);
//=> true

shebangRegex.exec(str)[0];
//=> '#!/usr/bin/env node'

License

MIT © Sindre Sorhus