* Remove the tail.
()
| 98 | * Remove the tail. |
| 99 | */ |
| 100 | pop(): string | null { |
| 101 | // If there is no tail, return null. |
| 102 | if (this.state.tail === null) { |
| 103 | return null; |
| 104 | } |
| 105 | |
| 106 | const url = this.state.tail; |
| 107 | this.remove(url); |
| 108 | |
| 109 | // This URL has been successfully evicted. |
| 110 | return url; |
| 111 | } |
| 112 | |
| 113 | remove(url: string): boolean { |
| 114 | const node = this.state.map[url]; |
no test coverage detected