| 131 | } |
| 132 | |
| 133 | class Limit { |
| 134 | private _current: number; |
| 135 | constructor(public readonly max: number) { |
| 136 | this._current = 0; |
| 137 | } |
| 138 | |
| 139 | isHit() { |
| 140 | return this._current >= this.max; |
| 141 | } |
| 142 | |
| 143 | increase(value: number) { |
| 144 | this._current += value; |
| 145 | } |
| 146 | |
| 147 | public current() { |
| 148 | return this._current; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | function hasIndex( |
| 153 | hit: RegExpMatchArray |
nothing calls this directly
no outgoing calls
no test coverage detected