v4.0 • Data • 19kb gzipped • MIT
DataSync
Offline-first sync for IndexedDB with conflict resolution you can actually reason about.

// why datasync
Offline is the default
Writes land locally first and reconcile when the connection returns. Your UI never waits on a network round trip to feel responsive.
// stack
Deterministic merges
Conflicts resolve through a strategy you supply, and every decision is logged so you can replay exactly what happened.
DataSync started as a single file in a client project and stayed small on purpose. It does one job, it does it in 19kb gzipped, and it has no runtime dependencies.
Getting started
Install it, import it, call it:
npm i datasync-js
Writes land locally first and reconcile when the connection returns. Your UI never waits on a network round trip to feel responsive.
What it does not do
It does not manage your state, style your components or ship a plugin system. Those are your decisions, and keeping them out is what keeps the bundle honest.
- Survives flaky networks
- Replayable conflict log
- MIT licensed, commercially friendly
Features
Survives flaky networks
Partial syncs resume from the last acknowledged record rather than starting over.
Replayable conflict log
Every merge decision is recorded with both inputs, so a bug report comes with its own reproduction.
Six themes
Token-driven, so bringing your own palette is a single object.
ESM and types
Ships module and CommonJS builds with hand-written type definitions and source maps.
Off the main thread
Heavy work moves to a worker automatically when one is available.
Accessible output
Every visual is paired with a text alternative that reflects the same data.
Get DataSync v4.0
6 files • .min.js 19kb • .zip 82kb • sha384 verified
Changelog
- New three-way merge strategy
- Sync resumes from partial batches
- IndexedDB adapter rewritten for Safari 17
- Fixed a memory leak on repeated teardown
- Source maps now published with every build
- Type definitions rewritten by hand
- Dropped the last runtime dependency
// related
Related products
ChartForge
Canvas charts in twelve lines. Responsive, accessible and dark-mode ready, with no D3 learning curve.
View →MotionEase
Physics-based micro-animations with a single call. Spring curves that feel right without a tuning session.
View →FormFlow
Validation and multi-step logic that works the same in React, Vue and vanilla. Your markup stays yours.
View →Ship the dashboard today.
MIT licensed. Commercial friendly. Five-minute setup.