New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

regexp-flags-upfront

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regexp-flags-upfront

Make regexps from a string that contains the flags as well as the pattern.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

regexp-flags-upfront

Make regexps from a string that contains the flags as well as the pattern.

API

This module exports one function:

makeRegExp(spec[, addFlags])

Where spec is your RegExp pattern, with a catch: If it starts with an expression like (?imu:), its letters will be used as the RegExp flags.

If addFlags is given, it should be an empty string or a string of only letters. They will be merged with the flags possibly found in spec.

Returns a RegExp object.

Known issues

  • Needs more/better tests and docs.

 

License

ISC

Keywords

flags

FAQs

Package last updated on 05 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts