You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.d.ts 446B

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;