Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

shebang-regex

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Issues
File Explorer

Advanced tools

shebang-regex

Regular expression for matching a shebang line

    4.0.0latest

Version published
Maintainers
1
Weekly downloads
49,806,807
decreased by-2.62%

Weekly downloads

Changelog

Source

Breaking

  • Require Node.js 12.20 b4dbefa
  • This package is now pure ESM. Please read this.

https://github.com/sindresorhus/shebang-regex/compare/v3.0.0...v4.0.0

Readme

Source

shebang-regex

Regular expression for matching a shebang line

Install

$ npm install shebang-regex

Usage

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'
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

What is shebang-regex?

Regular expression for matching a shebang line

Is shebang-regex popular?

The npm package shebang-regex receives a total of 41,881,446 weekly downloads. As such, shebang-regex popularity was classified as popular.

Is shebang-regex well maintained?

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.

Last updated on 13 Aug 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc