Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

regexp.prototype.flags

Package Overview
Dependencies
3
Maintainers
1
Versions
12
Issues
File Explorer

Advanced tools

regexp.prototype.flags

ES6 spec-compliant RegExp.prototype.flags shim.

    1.4.3latest

Version published
Maintainers
1
Weekly downloads
23,294,835
decreased by-13.82%

Weekly downloads

Changelog

Source

v1.4.3 - 2022-04-14

Commits

  • [Fix] when shimmed, name must be get flags fcefd00

Readme

Source

RegExp.prototype.flags Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

An ES6 spec-compliant RegExp.prototype.flags shim. Invoke its "shim" method to shim RegExp.prototype.flags if it is unavailable. Note: RegExp#flags requires a true ES5 environment - specifically, one with ES5 getters.

This package implements the es-shim API interface. It works in an ES5-supported environment and complies with the spec.

Most common usage:

var flags = require('regexp.prototype.flags'); assert(flags(/a/) === ''); assert(flags(new RegExp('a') === ''); assert(flags(/a/mig) === 'gim'); assert(flags(new RegExp('a', 'mig')) === 'gim'); if (!RegExp.prototype.flags) { flags.shim(); } assert(flags(/a/) === /a/.flags); assert(flags(new RegExp('a') === new RegExp('a').flags); assert(flags(/a/mig) === /a/mig.flags); assert(flags(new RegExp('a', 'mig')) === new RegExp('a', 'mig').flags);

Tests

Simply clone the repo, npm install, and run npm test

Keywords

FAQs

What is regexp.prototype.flags?

ES6 spec-compliant RegExp.prototype.flags shim.

Is regexp.prototype.flags popular?

The npm package regexp.prototype.flags receives a total of 18,668,005 weekly downloads. As such, regexp.prototype.flags popularity was classified as popular.

Is regexp.prototype.flags well maintained?

We found that regexp.prototype.flags demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 15 Apr 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
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