(url)
| 96 | } |
| 97 | |
| 98 | async function getDataInfo(url) { |
| 99 | const [err, data] = await getUserInfo(url) |
| 100 | .then((data) => [null, data]) |
| 101 | .catch((err) => [err, null]); |
| 102 | if (err) { |
| 103 | console.log(err); |
| 104 | return; |
| 105 | } |
| 106 | |
| 107 | return Object.fromEntries( |
| 108 | data |
| 109 | .match(/\w+=\d+/g) |
| 110 | .map((item) => item.split("=")) |
| 111 | .map(([k, v]) => [k, parseInt(v)]) |
| 112 | ); |
| 113 | } |
| 114 | |
| 115 | function getRmainingDays(resetDay) { |
| 116 | if (!resetDay) return 0; |
no test coverage detected