4
0
Fork 0
mirror of https://github.com/Azure/setup-helm.git synced 2025-11-07 21:16:57 +00:00
setup-helm/node_modules/shebang-regex
github-actions[bot] a517f2ff65
Add node modules and new code for release (#57)
Co-authored-by: taakleton <taakleton@users.noreply.github.com>
2022-01-26 17:16:26 -05:00
..
index.d.ts Add node modules and new code for release (#57) 2022-01-26 17:16:26 -05:00
index.js Add node modules and new code for release (#57) 2022-01-26 17:16:26 -05:00
license Add node modules and new code for release (#57) 2022-01-26 17:16:26 -05:00
package.json Add node modules and new code for release (#57) 2022-01-26 17:16:26 -05:00
readme.md Add node modules and new code for release (#57) 2022-01-26 17:16:26 -05:00

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