ES6 spec compliant shim for RegExp.prototype.flags, providing a flags() function to get the flag string from regular expressions. Useful for working in ES5 environments where RegExp.prototype.flags is unavailable, by calling the package’s shim method.
Project status
- Maintenance status: The source appears to be in light maintenance. The last tagged updates we can see are v1.5.4 on 2025-01-03, and there is an upstream push on 2025-12-10, but there is no evidence of frequent tagged updates after v1.5.4.
- Update cadence: Based on the provided history, tagged updates have been infrequent (roughly quarterly to annual earlier on), with the most recent tag in early 2025 and the next known upstream activity in late 2025.
AI summary generated
Recent updates
v1.5.4
v1.5.4 updates the package version and refactors the shim implementation to use helper dependencies (get-proto, gopd, and es-errors) instead of direct built-in Object methods. The provided release notes contain no documented changes, so the actual behavioral and environment-compatibility impact is only visible from the diff.
v1.5.3
v1.5.3 primarily updates dependency versions and adjusts the RegExp.prototype.flags polyfill logic to avoid unnecessary polyfilling when native support is present. The release notes section provided to us is empty, and the changelog entry in the diff only broadly states the polyfill fix.
v1.5.2
Release v1.5.2 was published on 2024-02-11, but the publisher did not provide any release notes. As a result, this release cannot be assessed for specific new features, bug fixes, breaking changes, security updates, or migration requirements from the provided data.
v1.5.1
Release v1.5.1 contains a small refactor of how the exported `RegExp.prototype.flags` getter function is named, plus dependency and dev-dependency updates. No release notes were provided, so the behavioral impact is inferred from the code diff.
v1.5.0
The provided release notes are empty (no publisher notes for v1.5.0). The code changes introduce a new flag handling path and update test and packaging/CI configuration.
v1.4.3
This release (v1.4.3) makes a small change to the shimmed RegExp.prototype.flags getter so its function name matches the expected value when function names are configurable. It also adds a new dependency and updates tests accordingly.
Breakingv1.4.2
Release v1.4.2 updates the polyfill logic for RegExp.prototype.flags, specifically around patching and the ordering of property getters. It also bumps several development dependencies and adds a new test that asserts the getter evaluation order.
v1.4.1
v1.4.1 updates the RegExp.prototype.flags polyfill implementation with a change in how it behaves when the runtime lacks ES5 property descriptor support. The code now avoids throwing in descriptorless environments, instead only attempting the polyfill path when descriptors are available.
v1.4.0
Version 1.4.0 updates the RegExp.prototype.flags implementation to account for the new `hasIndices`-related `d` flag. The accompanying test suite is refactored to dynamically cover all available regexp flags instead of hardcoded cases.
Featuresv1.3.2
Release v1.3.2 was published on 2022-01-13, but no release notes or change log details were provided in the publisher content. As a result, there is no documented information available here about new features, bug fixes, security updates, or breaking changes.