1 | var wellKnownSymbol = require('../internals/well-known-symbol');
|
2 | var create = require('../internals/object-create');
|
3 | var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
4 |
|
5 | var UNSCOPABLES = wellKnownSymbol('unscopables');
|
6 | var ArrayPrototype = Array.prototype;
|
7 |
|
8 |
|
9 |
|
10 | if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
11 | createNonEnumerableProperty(ArrayPrototype, UNSCOPABLES, create(null));
|
12 | }
|
13 |
|
14 |
|
15 | module.exports = function (key) {
|
16 | ArrayPrototype[UNSCOPABLES][key] = true;
|
17 | };
|