.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / add-to-unscopables.js
1 var wellKnownSymbol = require('../internals/well-known-symbol');
2 var create = require('../internals/object-create');
3 var definePropertyModule = require('../internals/object-define-property');
4
5 var UNSCOPABLES = wellKnownSymbol('unscopables');
6 var ArrayPrototype = Array.prototype;
7
8 // Array.prototype[@@unscopables]
9 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
10 if (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]
18 module.exports = function (key) {
19   ArrayPrototype[UNSCOPABLES][key] = true;
20 };