source: trip-planner-front/node_modules/core-js/modules/es.regexp.dot-all.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 893 bytes
Line 
1var DESCRIPTORS = require('../internals/descriptors');
2var UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');
3var defineProperty = require('../internals/object-define-property').f;
4var getInternalState = require('../internals/internal-state').get;
5var RegExpPrototype = RegExp.prototype;
6
7// `RegExp.prototype.dotAll` getter
8// https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall
9if (DESCRIPTORS && UNSUPPORTED_DOT_ALL) {
10 defineProperty(RegExpPrototype, 'dotAll', {
11 configurable: true,
12 get: function () {
13 if (this === RegExpPrototype) return undefined;
14 // We can't use InternalStateModule.getterFor because
15 // we don't add metadata for regexps created by a literal.
16 if (this instanceof RegExp) {
17 return !!getInternalState(this).dotAll;
18 }
19 throw TypeError('Incompatible receiver, RegExp required');
20 }
21 });
22}
Note: See TracBrowser for help on using the repository browser.