()
| 453 | */ |
| 454 | class HostMap extends events.EventEmitter{ |
| 455 | constructor() { |
| 456 | super(); |
| 457 | |
| 458 | this._items = new Map(); |
| 459 | this._values = null; |
| 460 | |
| 461 | Object.defineProperty(this, 'length', { get: () => this.values().length, enumerable: true }); |
| 462 | |
| 463 | /** |
| 464 | * Emitted when a host is added to the map |
| 465 | * @event HostMap#add |
| 466 | */ |
| 467 | /** |
| 468 | * Emitted when a host is removed from the map |
| 469 | * @event HostMap#remove |
| 470 | */ |
| 471 | } |
| 472 | |
| 473 | /** |
| 474 | * Executes a provided function once per map element. |