1 var isPrototypeOf = require('../../internals/object-is-prototype-of');
2 var flags = require('../regexp/flags');
4 var RegExpPrototype = RegExp.prototype;
6 module.exports = function (it) {
7 return (it === RegExpPrototype || isPrototypeOf(RegExpPrototype, it)) ? flags(it) : it.flags;