Last change
on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
693 bytes
|
Line | |
---|
1 | var DESCRIPTORS = require('../internals/descriptors');
|
---|
2 | var objectDefinePropertyModule = require('../internals/object-define-property');
|
---|
3 | var regExpFlags = require('../internals/regexp-flags');
|
---|
4 | var fails = require('../internals/fails');
|
---|
5 |
|
---|
6 | var FORCED = DESCRIPTORS && fails(function () {
|
---|
7 | // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
---|
8 | return Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.call({ dotAll: true, sticky: true }) !== 'sy';
|
---|
9 | });
|
---|
10 |
|
---|
11 | // `RegExp.prototype.flags` getter
|
---|
12 | // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
---|
13 | if (FORCED) objectDefinePropertyModule.f(RegExp.prototype, 'flags', {
|
---|
14 | configurable: true,
|
---|
15 | get: regExpFlags
|
---|
16 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.