shebang-regex
Advanced tools
Regular expression for matching a shebang line
Weekly downloads
Changelog
https://github.com/sindresorhus/shebang-regex/compare/v3.0.0...v4.0.0
Readme
Regular expression for matching a shebang line
$ npm install shebang-regex
import shebangRegex from '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'
Regular expression for matching a shebang line
The npm package shebang-regex receives a total of 41,881,446 weekly downloads. As such, shebang-regex popularity was classified as popular.
We found that shebang-regex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.