Commit fb54c99
committed
feat(pouch-link): Allow to inject an
In previous commit we added a `platform` option into the PouchLink
constructor in order to allow injecting custom local storage API and
PouchDB adapter from a react-native project
We also want to inject a custom `isOnline` method as react-native does
not provide the `window.navigator.onLine` API
Like for the other APIs, if no injection is given, then
`window.navigator.onLine` will be used by defaultisOnline method in CozyPouchLink1 parent 5f4d434 commit fb54c99
File tree
3 files changed
+9
-2
lines changed- packages/cozy-pouch-link/src
3 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | | - | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
0 commit comments