new WeakSet(_iterableopt)
Mimics the implementation of a native WeakSet. The only way to achieve this is by putting a property on the added value.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
_iterable |
* |
<optional> |
Optional: an iterable whose values will be added to the WeakSet. |
- Source:
Methods
add(_value) → {module:barejs/polyfill.WeakSet}
Adds a value to a WeakSet.
Parameters:
Name | Type | Description |
---|---|---|
_value |
The value to add. |
- Source:
Returns:
The WeakSet (for chaining)
delete(_value) → {boolean}
Remove the value from the WeakSet
Parameters:
Name | Type | Description |
---|---|---|
_value |
object | The value to remove. |
- Source:
Returns:
True if the value was deleted, false otherwise
- Type
- boolean
has(_value) → {boolean}
Check if the WeakSet has an entry for the specified _value.
Parameters:
Name | Type | Description |
---|---|---|
_value |
object | The object to check. |
- Source:
Returns:
True if the WeakSet contains _value, false otherwise.
- Type
- boolean