source: trip-planner-front/node_modules/core-js/modules/es.object.lookup-setter.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: 911 bytes
Line 
1'use strict';
2var $ = require('../internals/export');
3var DESCRIPTORS = require('../internals/descriptors');
4var FORCED = require('../internals/object-prototype-accessors-forced');
5var toObject = require('../internals/to-object');
6var toPropertyKey = require('../internals/to-property-key');
7var getPrototypeOf = require('../internals/object-get-prototype-of');
8var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
9
10// `Object.prototype.__lookupSetter__` method
11// https://tc39.es/ecma262/#sec-object.prototype.__lookupSetter__
12if (DESCRIPTORS) {
13 $({ target: 'Object', proto: true, forced: FORCED }, {
14 __lookupSetter__: function __lookupSetter__(P) {
15 var O = toObject(this);
16 var key = toPropertyKey(P);
17 var desc;
18 do {
19 if (desc = getOwnPropertyDescriptor(O, key)) return desc.set;
20 } while (O = getPrototypeOf(O));
21 }
22 });
23}
Note: See TracBrowser for help on using the repository browser.