Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
delete: d(function (value) {
var index = eIndexOf.call(this.__setData__, value);
if (index === -1) return false;
this.__setData__.splice(index, 1);
this.emit('_delete', index, value);
return true;
}),
entries: d(function () { return new Iterator(this, 'key+value'); }),
forOf(iterable, function (value) {
if (eIndexOf.call(this, value) !== -1) return;
this.push(value);
}, self.__setData__);
return self;
delete: d(function (key) {
var index = eIndexOf.call(this.__mapKeysData__, key);
if (index === -1) return false;
this.__mapKeysData__.splice(index, 1);
this.__mapValuesData__.splice(index, 1);
this.emit('_delete', index, key);
return true;
}),
entries: d(function () { return new Iterator(this, 'key+value'); }),
iterate = function (value) {
var i;
if (value == null) return;
value = desc._normalizeValue_(value);
if (value == null) return;
if (eq(setData[index], value)) {
++index;
return;
}
i = eIndexOf.call(setData, value);
if (i === -1) {
if (index === setData.length) setData.push(value);
else setData.splice(index, 0, value);
++l;
this.emit('_add', index, value);
if (isObservable) this._noteAdd_(value);
++index;
return;
}
if (i < index) return;
setData.splice(i, 1);
this.emit('_delete', i, value);
setData.splice(index, 0, value);
this.emit('_add', index, value);
++index;
};
delete: d(function (value) {
var index = eIndexOf.call(this.__setData__, value);
if (index === -1) return false;
this.__setData__.splice(index, 1);
this.emit('_delete', index, value);
return true;
}),
entries: d(function () { return new Iterator(this, 'key+value'); }),
iterate = function (value) {
if (value == null) return;
value = desc._normalizeValue_(value);
if (value == null) return;
if (eIndexOf.call(this, value) !== -1) return;
this.push(value);
};
if (isIterable(value)) forOf(value, iterate, self.__setData__);
get: d(function (key) {
var index = eIndexOf.call(this.__mapKeysData__, key);
if (index === -1) return;
return this.__mapValuesData__[index];
}),
has: d(function (key) {
forOf(iterable, function (value) {
var key = validValue(value)[0];
value = value[1];
if (eIndexOf.call(keys, key) !== -1) return;
keys.push(key);
values.push(value);
}, self);
return self;
forOf(iterable, function (value) {
if (eIndexOf.call(this, value) !== -1) return;
this.push(value);
}, self.__setData__);
return self;
has: d(function (value) {
return (eIndexOf.call(this.__setData__, value) !== -1);
}),
keys: d(getValues = function () { return this.values(); }),