Skip to content

A super lite chronology tracker to save and navigate application states (or any data you want).

License

Notifications You must be signed in to change notification settings

marcopiii/Tardis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A super lite chronology tracker to save and navigate application states (or any data you want).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published