ajuvercr / data-sync.js

Ever had problems syncing data over processes and instances? Not anymore _blazingly_ fast!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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);
}

About

Ever had problems syncing data over processes and instances? Not anymore _blazingly_ fast!


Languages

Language:TypeScript 100.0%