flags.js 220 B

1234567
  1. var flags = require('../regexp/flags');
  2. var RegExpPrototype = RegExp.prototype;
  3. module.exports = function (it) {
  4. return (it === RegExpPrototype || it instanceof RegExp) && !('flags' in it) ? flags(it) : it.flags;
  5. };