1 | 'use strict';
|
2 | var wellKnownSymbol = require('../internals/well-known-symbol');
|
3 | var create = require('../internals/object-create');
|
4 | var defineProperty = require('../internals/object-define-property').f;
|
5 |
|
6 | var UNSCOPABLES = wellKnownSymbol('unscopables');
|
7 | var ArrayPrototype = Array.prototype;
|
8 |
|
9 |
|
10 |
|
11 | if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
12 | defineProperty(ArrayPrototype, UNSCOPABLES, {
|
13 | configurable: true,
|
14 | value: create(null)
|
15 | });
|
16 | }
|
17 |
|
18 |
|
19 | module.exports = function (key) {
|
20 | ArrayPrototype[UNSCOPABLES][key] = true;
|
21 | };
|