MCPcopy
hub / github.com/vogler/free-games-claimer / jsonDb

Function jsonDb

src/util.js:15–15  ·  view source on GitHub ↗
(file, defaultData)

Source from the content-addressed store, hash-verified

13// json database
14import { JSONFilePreset } from 'lowdb/node';
15export const jsonDb = (file, defaultData) => JSONFilePreset(dataDir(file), defaultData);
16
17export const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
18// date and time as UTC (no timezone offset) in nicely readable and sortable format, e.g., 2022-10-06 12:05:27.313

Callers 4

prime-gaming.jsFile · 0.90
epic-games.jsFile · 0.90
gog.jsFile · 0.90
unrealengine.jsFile · 0.90

Calls 1

dataDirFunction · 0.85

Tested by

no test coverage detected