regexp-unsupported-dot-all.js 376 B

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