This commit is contained in:
16
node_modules/core-js/internals/regexp-get-flags.js
generated
vendored
Normal file
16
node_modules/core-js/internals/regexp-get-flags.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
var call = require('../internals/function-call');
|
||||
var hasOwn = require('../internals/has-own-property');
|
||||
var isPrototypeOf = require('../internals/object-is-prototype-of');
|
||||
var regExpFlagsDetection = require('../internals/regexp-flags-detection');
|
||||
var regExpFlagsGetterImplementation = require('../internals/regexp-flags');
|
||||
|
||||
var RegExpPrototype = RegExp.prototype;
|
||||
|
||||
module.exports = regExpFlagsDetection.correct ? function (it) {
|
||||
return it.flags;
|
||||
} : function (it) {
|
||||
return (!regExpFlagsDetection.correct && isPrototypeOf(RegExpPrototype, it) && !hasOwn(it, 'flags'))
|
||||
? call(regExpFlagsGetterImplementation, it)
|
||||
: it.flags;
|
||||
};
|
||||
Reference in New Issue
Block a user