You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

11 lines
358 B

'use strict';
var hasSymbols = require('has-symbols')();
var regexpMatchAll = require('./regexp-matchall');
module.exports = function getRegExpMatchAllPolyfill() {
if (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {
return regexpMatchAll;
}
return RegExp.prototype[Symbol.matchAll];
};