runtime-shared
Advanced tools
Comparing version 0.2.9 to 0.2.10
'use strict'; | ||
/* eslint no-extend-native: "off" */ | ||
var _symbol = require('./symbol'); | ||
var _symbol2 = _interopRequireDefault(_symbol); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// Deleted map items mess with iterator pointers, so rather than removing them mark them as deleted. Can't use undefined or null since those both valid keys so use a private symbol. | ||
var undefMarker = Symbol('undef'); | ||
var undefMarker = (0, _symbol2.default)('undef'); | ||
// NaN cannot be found in an array using indexOf, so we encode NaNs using a private symbol. | ||
var NaNMarker = Symbol('NaN'); | ||
/* eslint no-extend-native: "off" */ | ||
var NaNMarker = (0, _symbol2.default)('NaN'); | ||
var ACCESSOR_SUPPORT = true; | ||
@@ -123,3 +128,3 @@ | ||
}; | ||
Map.prototype.entries = Map.prototype[Symbol.iterator] = function () { | ||
Map.prototype.entries = Map.prototype[_symbol2.default.iterator] = function () { | ||
return makeIterator(this, function (i) { | ||
@@ -138,6 +143,13 @@ return [decodeKey(this._keys[i]), this._values[i]]; | ||
}; | ||
Map.prototype.constructor = Map.prototype[Symbol.species] = Map; | ||
Map.length = 0; | ||
Map.prototype[_symbol2.default.species] = Map; | ||
Object.defineProperty(Map, 'constructor', { | ||
value: Map | ||
}); | ||
Object.defineProperty(Map, 'length', { | ||
value: 0 | ||
}); | ||
module.exports = Map; |
'use strict'; | ||
/* eslint no-extend-native: "off" */ | ||
var _symbol = require('./symbol'); | ||
var _symbol2 = _interopRequireDefault(_symbol); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// Deleted map items mess with iterator pointers, so rather than removing them mark them as deleted. Can't use undefined or null since those both valid keys so use a private symbol. | ||
var undefMarker = Symbol('undef'); | ||
var undefMarker = (0, _symbol2.default)('undef'); | ||
// NaN cannot be found in an array using indexOf, so we encode NaNs using a private symbol. | ||
var NaNMarker = Symbol('NaN'); | ||
/* eslint no-extend-native: "off" */ | ||
var NaNMarker = (0, _symbol2.default)('NaN'); | ||
@@ -93,3 +98,3 @@ var ACCESSOR_SUPPORT = true; | ||
}; | ||
Set.prototype.entries = Set.prototype[Symbol.iterator] = function () { | ||
Set.prototype.entries = Set.prototype[_symbol2.default.iterator] = function () { | ||
return makeIterator(this, function (i) { | ||
@@ -108,6 +113,13 @@ return [decodeVal(this._values[i]), decodeVal(this._values[i])]; | ||
}; | ||
Set.prototype.constructor = Set.prototype[Symbol.species] = Set; | ||
Set.length = 0; | ||
Set.prototype[_symbol2.default.species] = Set; | ||
Object.defineProperty(Set, 'constructor', { | ||
value: Set | ||
}); | ||
Object.defineProperty(Set, 'length', { | ||
value: 0 | ||
}); | ||
module.exports = Set; |
@@ -30,4 +30,3 @@ 'use strict'; | ||
var postfix = 0, | ||
name, | ||
ie11BugWorkaround; | ||
name; | ||
while (created[desc + (postfix || '')]) { | ||
@@ -124,4 +123,2 @@ ++postfix; | ||
// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 | ||
defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, { value: SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive] }); | ||
module.exports = Set; | ||
defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, { value: SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive] }); |
{ | ||
"name": "runtime-shared", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "Shared Runtime.", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
/* eslint no-extend-native: "off" */ | ||
import Symbol from './symbol'; | ||
@@ -143,7 +144,13 @@ // Deleted map items mess with iterator pointers, so rather than removing them mark them as deleted. Can't use undefined or null since those both valid keys so use a private symbol. | ||
}; | ||
Map.prototype.constructor = | ||
Map.prototype[Symbol.species] = Map; | ||
Map.length = 0; | ||
Object.defineProperty(Map, 'constructor', { | ||
value: Map | ||
}); | ||
Object.defineProperty(Map, 'length', { | ||
value: 0 | ||
}); | ||
module.exports = Map; |
/* eslint no-extend-native: "off" */ | ||
import Symbol from './symbol'; | ||
@@ -106,7 +107,13 @@ // Deleted map items mess with iterator pointers, so rather than removing them mark them as deleted. Can't use undefined or null since those both valid keys so use a private symbol. | ||
}; | ||
Set.prototype.constructor = | ||
Set.prototype[Symbol.species] = Set; | ||
Set.length = 0; | ||
Object.defineProperty(Set, 'constructor', { | ||
value: Set | ||
}); | ||
Object.defineProperty(Set, 'length', { | ||
value: 0 | ||
}); | ||
module.exports = Set; |
@@ -25,3 +25,3 @@ /* eslint no-extend-native: "off", new-cap: "off" */ | ||
return function(desc) { | ||
var postfix = 0, name, ie11BugWorkaround; | ||
var postfix = 0, name; | ||
while (created[desc + (postfix || '')]) ++postfix; | ||
@@ -118,3 +118,1 @@ desc += postfix || ''; | ||
{value: SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]}); | ||
module.exports = Set; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
230578
26
4381