Lines of Code | 21 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | window.cancelAnimationFrame = window.cancelAnimationFrame || function(){} |
||
2 | window.requestAnimationFrame = window.requestAnimationFrame || function(){} |
||
3 | class LocalStorageMock { |
||
4 | constructor() { |
||
5 | this.store = {}; |
||
6 | } |
||
7 | |||
8 | clear() { |
||
9 | this.store = {}; |
||
10 | } |
||
11 | |||
12 | getItem(key) { |
||
13 | return this.store[key]; |
||
14 | } |
||
15 | |||
16 | setItem(key, value) { |
||
17 | this.store[key] = value.toString(); |
||
18 | } |
||
19 | }; |
||
20 | |||
21 | global.localStorage = new LocalStorageMock; |
||
22 |