web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
621 B

  1. var DESCRIPTORS = require('../internals/descriptors');
  2. var objectDefinePropertyModule = require('../internals/object-define-property');
  3. var regExpFlags = require('../internals/regexp-flags');
  4. var UNSUPPORTED_Y = require('../internals/regexp-sticky-helpers').UNSUPPORTED_Y;
  5. // `RegExp.prototype.flags` getter
  6. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  7. // eslint-disable-next-line es/no-regexp-prototype-flags -- required for testing
  8. if (DESCRIPTORS && (/./g.flags != 'g' || UNSUPPORTED_Y)) {
  9. objectDefinePropertyModule.f(RegExp.prototype, 'flags', {
  10. configurable: true,
  11. get: regExpFlags
  12. });
  13. }