UNPKG

react-router-ga

Version:

[![Downloads](https://img.shields.io/npm/dm/react-router-ga)](https://npm.im/react-router-ga) [![Version](https://img.shields.io/npm/v/react-router-ga)](https://npm.im/react-router-ga) [![License](https://img.shields.io/npm/l/react-router-ga)](https://ope

21 lines (17 loc) 640 B
'use strict'; var implementation = require('./implementation'); var supportsDescriptors = require('define-properties').supportsDescriptors; var gOPD = Object.getOwnPropertyDescriptor; var TypeErr = TypeError; module.exports = function getPolyfill() { if (!supportsDescriptors) { throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors'); } if (/a/mig.flags === 'gim') { var descriptor = gOPD(RegExp.prototype, 'flags'); if (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') { return descriptor.get; } } return implementation; };