source: trip-planner-front/node_modules/core-js/internals/add-to-unscopables.js@ 188ee53

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

initial commit

  • Property mode set to 100644
File size: 666 bytes
Line 
1var wellKnownSymbol = require('../internals/well-known-symbol');
2var create = require('../internals/object-create');
3var definePropertyModule = require('../internals/object-define-property');
4
5var UNSCOPABLES = wellKnownSymbol('unscopables');
6var ArrayPrototype = Array.prototype;
7
8// Array.prototype[@@unscopables]
9// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
10if (ArrayPrototype[UNSCOPABLES] == undefined) {
11 definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
12 configurable: true,
13 value: create(null)
14 });
15}
16
17// add a key to Array.prototype[@@unscopables]
18module.exports = function (key) {
19 ArrayPrototype[UNSCOPABLES][key] = true;
20};
Note: See TracBrowser for help on using the repository browser.