Icard/angular-clarity-master(work.../node_modules/shebang-regex
realSnehal 336a6a07d0 frnt 2024-07-16 20:53:22 +05:30
..
index.d.ts frnt 2024-07-16 20:53:22 +05:30
index.js frnt 2024-07-16 20:53:22 +05:30
license frnt 2024-07-16 20:53:22 +05:30
package.json frnt 2024-07-16 20:53:22 +05:30
readme.md frnt 2024-07-16 20:53:22 +05:30

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