Gathering detailed insights and metrics for regexp.prototype.flags
Gathering detailed insights and metrics for regexp.prototype.flags
Gathering detailed insights and metrics for regexp.prototype.flags
Gathering detailed insights and metrics for regexp.prototype.flags
ES6 spec-compliant RegExp.prototype.flags shim
npm install regexp.prototype.flags
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
8 Stars
161 Commits
10 Forks
5 Watching
1 Branches
3 Contributors
Updated on 03 Oct 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-5.8%
6,821,814
Compared to previous day
Last week
1.8%
39,411,091
Compared to previous week
Last month
7.8%
164,332,607
Compared to previous month
Last year
20.2%
1,738,747,334
Compared to previous year
4
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:
1var flags = require('regexp.prototype.flags'); 2var assert = require('assert'); 3 4assert(flags(/a/) === ''); 5assert(flags(new RegExp('a')) === ''); 6assert(flags(/a/mig) === 'gim'); 7assert(flags(new RegExp('a', 'mig')) === 'gim'); 8 9if (!RegExp.prototype.flags) { 10 flags.shim(); 11} 12 13assert(flags(/a/) === /a/.flags); 14assert(flags(new RegExp('a')) === new RegExp('a').flags); 15assert(flags(/a/mig) === /a/mig.flags); 16assert(flags(new RegExp('a', 'mig')) === new RegExp('a', 'mig').flags);
Simply clone the repo, npm install
, and run npm test
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
5 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More