https://github.com/inspect-js/has-named-captures
Does the JS environment support named capture groups in regexes?
https://github.com/inspect-js/has-named-captures
capture group javascript named regex regular-expression regular-expressions
Last synced: 8 months ago
JSON representation
Does the JS environment support named capture groups in regexes?
- Host: GitHub
- URL: https://github.com/inspect-js/has-named-captures
- Owner: inspect-js
- License: mit
- Created: 2024-01-29T22:44:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-11T04:34:00.000Z (over 2 years ago)
- Last Synced: 2025-03-25T16:54:04.032Z (about 1 year ago)
- Topics: capture, group, javascript, named, regex, regular-expression, regular-expressions
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# has-named-captures [![Version Badge][npm-version-svg]][package-url]
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Does the JS environment support named capture groups in regexes?
Returns `true` in node 10+, and equivalent engines.
## Example
```js
var hasNamedCaptures = require('has-named-captures');
var assert = require('assert');
assert.equal(typeof hasNamedCaptures(), 'boolean', 'returns true or false');
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/has-named-captures
[npm-version-svg]: https://versionbadg.es/inspect-js/has-named-captures.svg
[deps-svg]: https://david-dm.org/inspect-js/has-named-captures.svg
[deps-url]: https://david-dm.org/inspect-js/has-named-captures
[dev-deps-svg]: https://david-dm.org/inspect-js/has-named-captures/dev-status.svg
[dev-deps-url]: https://david-dm.org/inspect-js/has-named-captures#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/has-named-captures.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/has-named-captures.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/has-named-captures.svg
[downloads-url]: https://npm-stat.com/charts.html?package=has-named-captures
[codecov-image]: https://codecov.io/gh/inspect-js/has-named-captures/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/has-named-captures/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-named-captures
[actions-url]: https://github.com/inspect-js/has-named-captures/actions