MCPcopy Create free account
hub / github.com/NobyDa/Script / argsList

Function argsList

Bilibili-DailyBonus/ExchangePoints.js:259–266  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

257}
258
259function argsList(data) {
260 return Array.from(
261 data.split("&")
262 .map((i) => i.split("="))
263 .map(([k, v]) => [k, decodeURIComponent(v)])
264 )
265 .reduce((a, [k, v]) => Object.assign(a, { [k]: v }), {})
266}
267
268//Bark APP notify
269async function BarkNotify(c, k, t, b) { for (let i = 0; i < 3; i++) { c.log(`🔷Bark notify >> Start push (${i + 1})`); const s = await new Promise((n) => { c.post({ url: 'https://api.day.app/push', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ title: t, body: b, device_key: k, ext_params: { group: t } }) }, (e, r, d) => r && r.status == 200 ? n(1) : n(d || e)) }); if (s === 1) { c.log('✅Push success!'); break } else { c.log(`❌Push failed! >> ${s.message || s}`) } } };

Callers 1

ExchangePoints.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected