PromoCursed/node_modules/core-js/internals/regexp-get-flags.js

14 lines
501 B
JavaScript
Raw Normal View History

2024-08-20 23:25:37 +04:00
'use strict';
var call = require('../internals/function-call');
var hasOwn = require('../internals/has-own-property');
var isPrototypeOf = require('../internals/object-is-prototype-of');
var regExpFlags = require('../internals/regexp-flags');
var RegExpPrototype = RegExp.prototype;
module.exports = function (R) {
var flags = R.flags;
return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R)
? call(regExpFlags, R) : flags;
};