|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
446 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | /**
|
|---|
| 2 | Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line.
|
|---|
| 3 |
|
|---|
| 4 | @example
|
|---|
| 5 | ```
|
|---|
| 6 | import shebangRegex = require('shebang-regex');
|
|---|
| 7 |
|
|---|
| 8 | const string = '#!/usr/bin/env node\nconsole.log("unicorns");';
|
|---|
| 9 |
|
|---|
| 10 | shebangRegex.test(string);
|
|---|
| 11 | //=> true
|
|---|
| 12 |
|
|---|
| 13 | shebangRegex.exec(string)[0];
|
|---|
| 14 | //=> '#!/usr/bin/env node'
|
|---|
| 15 |
|
|---|
| 16 | shebangRegex.exec(string)[1];
|
|---|
| 17 | //=> '/usr/bin/env node'
|
|---|
| 18 | ```
|
|---|
| 19 | */
|
|---|
| 20 | declare const shebangRegex: RegExp;
|
|---|
| 21 |
|
|---|
| 22 | export = shebangRegex;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.