Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

es.regexp.dot-all.js 1006B

1234567891011121314151617181920212223242526
  1. 'use strict';
  2. var DESCRIPTORS = require('../internals/descriptors');
  3. var UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');
  4. var classof = require('../internals/classof-raw');
  5. var defineBuiltInAccessor = require('../internals/define-built-in-accessor');
  6. var getInternalState = require('../internals/internal-state').get;
  7. var RegExpPrototype = RegExp.prototype;
  8. var $TypeError = TypeError;
  9. // `RegExp.prototype.dotAll` getter
  10. // https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall
  11. if (DESCRIPTORS && UNSUPPORTED_DOT_ALL) {
  12. defineBuiltInAccessor(RegExpPrototype, 'dotAll', {
  13. configurable: true,
  14. get: function dotAll() {
  15. if (this === RegExpPrototype) return;
  16. // We can't use InternalStateModule.getterFor because
  17. // we don't add metadata for regexps created by a literal.
  18. if (classof(this) === 'RegExp') {
  19. return !!getInternalState(this).dotAll;
  20. }
  21. throw new $TypeError('Incompatible receiver, RegExp required');
  22. }
  23. });
  24. }