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.

22 rivejä
446 B

3 vuotta sitten
  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;