index.d.ts 446 B

12345678910111213141516171819202122
  1. /**
  2. Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line.
  3. @example
  4. ```
  5. import shebangRegex = require('shebang-regex');
  6. const string = '#!/usr/bin/env node\nconsole.log("unicorns");';
  7. shebangRegex.test(string);
  8. //=> true
  9. shebangRegex.exec(string)[0];
  10. //=> '#!/usr/bin/env node'
  11. shebangRegex.exec(string)[1];
  12. //=> '/usr/bin/env node'
  13. ```
  14. */
  15. declare const shebangRegex: RegExp;
  16. export = shebangRegex;