shebang-regex

WebJar for shebang-regex

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

shebang-regex
Last Version

Last Version

3.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

shebang-regex
WebJar for shebang-regex
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/shebang-regex

Download shebang-regex

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/shebang-regex/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>shebang-regex</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/shebang-regex/
implementation 'org.webjars.npm:shebang-regex:3.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/shebang-regex/
implementation ("org.webjars.npm:shebang-regex:3.0.0")
'org.webjars.npm:shebang-regex:jar:3.0.0'
<dependency org="org.webjars.npm" name="shebang-regex" rev="3.0.0">
  <artifact name="shebang-regex" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='shebang-regex', version='3.0.0')
)
libraryDependencies += "org.webjars.npm" % "shebang-regex" % "3.0.0"
[org.webjars.npm/shebang-regex "3.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

shebang-regex

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'

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.

Versions

Version
3.0.0
1.0.0