flags.js 285 B

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