polyfill.js 271 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 'use strict'; var implementation = require('./implementation'); module.exports = function getPolyfill() { if (String.prototype.matchAll) { try { ''.matchAll(RegExp.prototype); } catch (e) { return String.prototype.matchAll; } } return implementation; };