Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (setPrototypeOf) setPrototypeOf(MapIterator, Iterator);
MapIterator.prototype = Object.create(Iterator.prototype, {
constructor: d(MapIterator),
_resolve: d(function (i) {
if (this.__kind__ === 'value') return this.__values__[i];
if (this.__kind__ === 'key') return this.__list__[i];
return [this.__list__[i], this.__values__[i]];
}),
_unBind: d(function () {
this.__values__ = null;
unBind.call(this);
}),
toString: d(function () { return '[object Map Iterator]'; })
});
Object.defineProperty(MapIterator.prototype, toStringTagSymbol,
d('c', 'Map Iterator'));
unBind.call(this);
}),
toString: d(function () { return '[object Map Iterator]'; })
}, autoBind({
_onAdd: d(function (key) { this.__list__.push(key); }),
_onDelete: d(function (key) {
var index = this.__list__.lastIndexOf(key);
if (index < this.__nextIndex__) return;
this.__list__.splice(index, 1);
}),
_onClear: d(function () {
clear.call(this.__list__);
this.__nextIndex__ = 0;
})
})));
Object.defineProperty(PrimitiveMapIterator.prototype, toStringTagSymbol,
d('c', 'Map Iterator'));
if (setPrototypeOf) setPrototypeOf(MapIterator, Iterator);
MapIterator.prototype = Object.create(Iterator.prototype, {
constructor: d(MapIterator),
_resolve: d(function (i) {
if (this.__kind__ === 'value') return this.__values__[i];
if (this.__kind__ === 'key') return this.__list__[i];
return [this.__list__[i], this.__values__[i]];
}),
_unBind: d(function () {
this.__values__ = null;
unBind.call(this);
}),
toString: d(function () { return '[object Map Iterator]'; })
});
Object.defineProperty(MapIterator.prototype, toStringTagSymbol,
d('c', 'Map Iterator'));
unBind.call(this);
}),
toString: d(function () { return '[object Map Iterator]'; })
}, autoBind({
_onAdd: d(function (key) { this.__list__.push(key); }),
_onDelete: d(function (key) {
var index = this.__list__.lastIndexOf(key);
if (index < this.__nextIndex__) return;
this.__list__.splice(index, 1);
}),
_onClear: d(function () {
clear.call(this.__list__);
this.__nextIndex__ = 0;
})
})));
Object.defineProperty(PrimitiveMapIterator.prototype, toStringTagSymbol,
d('c', 'Map Iterator'));
unBind.call(this);
}),
toString: d(function () { return '[object Set Iterator]'; })
}, autoBind({
_onAdd: d(function (key) { this.__list__.push(key); }),
_onDelete: d(function (key) {
var index = this.__list__.lastIndexOf(key);
if (index < this.__nextIndex__) return;
this.__list__.splice(index, 1);
}),
_onClear: d(function () {
clear.call(this.__list__);
this.__nextIndex__ = 0;
})
})));
Object.defineProperty(PrimitiveSetIterator.prototype, toStringTagSymbol,
d('c', 'Set Iterator'));