Skip to content

Does the JS environment support named capture groups in regexes?

License

Notifications You must be signed in to change notification settings

inspect-js/has-named-captures

Repository files navigation

has-named-captures Version Badge

github actions coverage License Downloads

npm badge

Does the JS environment support named capture groups in regexes?

Returns true in node 10+, and equivalent engines.

Example

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