595d19e01756c1631bfb7b573dc9e83cc9cbc6ce
2 * List implementation relying on an array or if supported on a Set to hold values.
4 * @author Alexander Ebert
5 * @copyright 2001-2019 WoltLab GmbH
6 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
8 define(["require", "exports"], function (require
, exports
) {
10 /** @deprecated 5.4 Use a `Set` instead. */
14 * Appends an element to the list, silently rejects adding an already existing value.
20 * Removes all elements from the list.
26 * Removes an element from the list, returns true if the element was in the list.
29 return this._set
.delete(value
);
32 * Invokes the `callback` for each element in the list.
35 this._set
.forEach(callback
);
38 * Returns true if the list contains the element.
41 return this._set
.has(value
);
44 return this._set
.size
;