()
| 47 | } |
| 48 | |
| 49 | public async decrease(): Promise<void> { |
| 50 | const { count } = await this.get(); |
| 51 | if (count < 1) { |
| 52 | return; |
| 53 | } |
| 54 | await this.set({ count: count - 1 }); |
| 55 | } |
| 56 | |
| 57 | public async clear(): Promise<void> { |
| 58 | await this.set({ count: 0 }); |