UNPKG

299 BJavaScriptView Raw
1'use strict';
2var isPrototypeOf = require('../../internals/object-is-prototype-of');
3var flags = require('../regexp/flags');
4
5var RegExpPrototype = RegExp.prototype;
6
7module.exports = function (it) {
8 return (it === RegExpPrototype || isPrototypeOf(RegExpPrototype, it)) ? flags(it) : it.flags;
9};