Emmanuil 73a9f0ffcf 20.07.2020 %!s(int64=4) %!d(string=hai) anos
..
index.d.ts 73a9f0ffcf 20.07.2020 %!s(int64=4) %!d(string=hai) anos
index.js 73a9f0ffcf 20.07.2020 %!s(int64=4) %!d(string=hai) anos
license 73a9f0ffcf 20.07.2020 %!s(int64=4) %!d(string=hai) anos
package.json 73a9f0ffcf 20.07.2020 %!s(int64=4) %!d(string=hai) anos
readme.md 73a9f0ffcf 20.07.2020 %!s(int64=4) %!d(string=hai) anos

readme.md

shebang-regex Build Status

Regular expression for matching a shebang line

Install

$ npm install shebang-regex

Usage

const shebangRegex = require('shebang-regex');

const string = '#!/usr/bin/env node\nconsole.log("unicorns");';

shebangRegex.test(string);
//=> true

shebangRegex.exec(string)[0];
//=> '#!/usr/bin/env node'

shebangRegex.exec(string)[1];
//=> '/usr/bin/env node'

License

MIT © Sindre Sorhus