setup-node/node_modules/shebang-regex
2019-08-05 15:18:52 -04:00
..
index.js new toolkit and scoped registries 2019-08-05 15:18:52 -04:00
license new toolkit and scoped registries 2019-08-05 15:18:52 -04:00
package.json new toolkit and scoped registries 2019-08-05 15:18:52 -04:00
readme.md new toolkit and scoped registries 2019-08-05 15:18:52 -04:00

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