(iterator)
| 42 | |
| 43 | // Iterates over the items in the map. Return `false` to break the loop. |
| 44 | forEach(iterator) { |
| 45 | // don't use _.each, because we can't break out of it. |
| 46 | for (const [key, value] of this._map){ |
| 47 | var breakIfFalse = iterator.call( |
| 48 | null, |
| 49 | value, |
| 50 | this._idParse(key) |
| 51 | ); |
| 52 | if (breakIfFalse === false) { |
| 53 | return; |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | size() { |
| 59 | return this._map.size; |
no test coverage detected