regexp-unsupported-dot-all.js 363 B

1234567891011
  1. 'use strict';
  2. var fails = require('../internals/fails');
  3. var global = require('../internals/global');
  4. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  5. var $RegExp = global.RegExp;
  6. module.exports = fails(function () {
  7. var re = $RegExp('.', 's');
  8. return !(re.dotAll && re.test('\n') && re.flags === 's');
  9. });