stale/node_modules/shebang-regex
Shawn Napora c607b751c2 release v1 2019-08-06 17:37:58 -04:00
..
index.js release v1 2019-08-06 17:37:58 -04:00
license release v1 2019-08-06 17:37:58 -04:00
package.json release v1 2019-08-06 17:37:58 -04:00
readme.md release v1 2019-08-06 17:37:58 -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