mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-06 01:49:14 +08:00
11 lines
358 B
Text
11 lines
358 B
Text
'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];
|
|
};
|