|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
653 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var call = require('../internals/function-call');
|
|---|
| 3 | var hasOwn = require('../internals/has-own-property');
|
|---|
| 4 | var isPrototypeOf = require('../internals/object-is-prototype-of');
|
|---|
| 5 | var regExpFlagsDetection = require('../internals/regexp-flags-detection');
|
|---|
| 6 | var regExpFlagsGetterImplementation = require('../internals/regexp-flags');
|
|---|
| 7 |
|
|---|
| 8 | var RegExpPrototype = RegExp.prototype;
|
|---|
| 9 |
|
|---|
| 10 | module.exports = regExpFlagsDetection.correct ? function (it) {
|
|---|
| 11 | return it.flags;
|
|---|
| 12 | } : function (it) {
|
|---|
| 13 | return (!regExpFlagsDetection.correct && isPrototypeOf(RegExpPrototype, it) && !hasOwn(it, 'flags'))
|
|---|
| 14 | ? call(regExpFlagsGetterImplementation, it)
|
|---|
| 15 | : it.flags;
|
|---|
| 16 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.