tree: f8bf4aa60449f1ad110feecfe414bff80b02b667 [path history] [tgz]
  1. index.js
  2. LICENSE
  3. package.json
  4. readme.md
third_party/devtools/node_modules/shebang-regex/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