📄 polyfill.js
/home/palash/git/site/node_modules/string.prototype.matchall/polyfill.js
Language: js • Lines: 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;
};