1.0.0 • Published 2 years ago
@ajuvercr/data-sync v1.0.0
data-sync.js
A small js library that syncs object across runtimes.
Contents
FileDataSync
Stores objects as a file. Changing the inner state when the file is changed.
Usage:
async main() {
const dataSync = create("file", "file.json");
const item = await dataSync.get();
const isFirstTime = !!item;
await dataSync.set(42);
}
1.0.0
2 years ago