Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 1.96 KB

README.md

File metadata and controls

76 lines (54 loc) · 1.96 KB

Tardis

A super lite chronology tracker to save and navigate application states (or any data you want).
No dependencies, lightweight & fully portable.

Overview

The funcionalities of Tardis are intentionally cut to the bone to provide a basic (yet very effective) way to keep a chronology of the state in a Redux-like architecture.

  • Create a Tardis instance
let stateTracker = Tardis<AppState>()
  • Save snapshots of the application state (or any other data you want to track)
stateTracker.save(snapshot: appState)
  • Make your application time-travel!
if stateTracker.hasPrevious {
    appState = stateTracker.previous()
}
if stateTracker.hasNext {
    appState = stateTracker.next()
}
appState = stateTracker.oldest()
appState = stateTracker.latest()
  • Discard all snapshots and restart with new tracking
stateTracker.reboot(with: appState)

And that's almost all. Check documentation comments in quick help for more details about specific functions.

Installation

You can install Tardis using CocoaPods.

use_frameworks!
pod 'Tardis'

Contribute

  • If you've found a bug, open an issue;
  • If you have a feature request, open an issue;
  • If you want to contribute, submit a pull request;

License

Tardis is available under the MIT license.