Sha256: dbb6262e5026751faddbc3496fc750f266ec55e7d23afa2898a8287ae33c01b9
Contents?: true
Size: 580 Bytes
Versions: 7
Compression:
Stored size: 580 Bytes
Contents
var wellKnownSymbol = require('../internals/well-known-symbol'); var create = require('../internals/object-create'); var hide = require('../internals/hide'); var UNSCOPABLES = wellKnownSymbol('unscopables'); var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables] // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables if (ArrayPrototype[UNSCOPABLES] == undefined) { hide(ArrayPrototype, UNSCOPABLES, create(null)); } // add a key to Array.prototype[@@unscopables] module.exports = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; };
Version data entries
7 entries across 7 versions & 2 rubygems