Sha256: e8affaaba506bdfcc8192b64d367b9a91fe1fa3cc530e79212d2f49d1264abf9
Contents?: true
Size: 650 Bytes
Versions: 13
Compression:
Stored size: 650 Bytes
Contents
'use strict'; var implementation = require('./implementation'); var supportsDescriptors = require('define-properties').supportsDescriptors; var $gOPD = Object.getOwnPropertyDescriptor; var $TypeError = TypeError; module.exports = function getPolyfill() { if (!supportsDescriptors) { throw new $TypeError('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; };
Version data entries
13 entries across 12 versions & 6 rubygems