()
| 50 | } |
| 51 | |
| 52 | shift() { |
| 53 | if (this.isEmpty) { |
| 54 | return undefined; |
| 55 | } |
| 56 | |
| 57 | const item = this.start.item; |
| 58 | if (this.start === this.end) { |
| 59 | this.clear(); |
| 60 | return item; |
| 61 | } |
| 62 | |
| 63 | this.start = this.start.next; |
| 64 | this.start.previous = undefined; |
| 65 | return item; |
| 66 | } |
| 67 | |
| 68 | clear() { |
| 69 | this.start = undefined; |
no test coverage detected