Liking cljdoc? Tell your friends :D

historian.core

Manage states for your atoms. (Easy undo/redo)

Manage states for your atoms. (Easy undo/redo)
raw docstring

*record-active*clj/s

source

alexandriaclj/s

The great library... store your stuff here.

The great library... store your stuff here.
sourceraw docstring

can-redo?clj/s

(can-redo?)

Can we redo?

Can we redo?
sourceraw docstring

can-undo?clj/s

(can-undo?)

Do we have enough history to undo?

Do we have enough history to undo?
sourceraw docstring

clear-history!clj/s

(clear-history!)
source

different-from?clj/s

(different-from? new old)

Check if any non-passive snapshot is different.

Check if any non-passive snapshot is different.
sourceraw docstring

get-library-atomclj/s

(get-library-atom)
source

get-prophecy-atomclj/s

(get-prophecy-atom)
source

nostradamusclj/s

What will happen in the future...

What will happen in the future...
sourceraw docstring

off-the-recordclj/s≠macro

clj
(off-the-record & content)
cljs
(off-the-record &form &env & content)

Temporarily deactivate the watches write to history.

Temporarily deactivate the watches write to history.
source (clj)source (cljs)raw docstring

overseerclj/s

Who should we record?

Who should we record?
sourceraw docstring

overwrite-record!clj/s

(overwrite-record!)
(overwrite-record! snaps)

Overwrite the last historic entry with a new one.

Overwrite the last historic entry with a new one.
sourceraw docstring

record!clj/s

(record! atm k)
(record! atm k passive?)

Add the atom to the overseer watch. When any of the atom under its watch is modified, it triggers a save of every atom to history (if any of the atom is different form the last historic state). Return the atom.

If `passive?' is true, the atom will NOT trigger any new save and will only be saved when another atom under watch is modified.

Add the atom to the overseer watch. When any of the atom under its
watch is modified, it triggers a save of every atom to history (if
any of the atom is different form the last historic state). Return
the atom.

If `passive?' is true, the atom will NOT trigger any new save and
will only be saved when another atom under watch is modified.
sourceraw docstring

redo!clj/s

(redo!)
source

replace-library!clj/s

(replace-library! new-atom)

The library atom (where all records are kept to enable 'undo') will be replaced by the new-atom. Useful if you've already done some modifications to the new-atom (like added some watchers). Depending on where you use this function, you might want to fire a `trigger-record!' just after.

Usually, one would also want to use `replace-prophecy!' in order to replace the 'redo' atom.

The library atom (where all records are kept to enable 'undo') will
be replaced by the new-atom. Useful if you've already done some
modifications to the new-atom (like added some watchers). Depending
on where you use this function, you might want to fire a
`trigger-record!' just after.

Usually, one would also want to use `replace-prophecy!' in order to
replace the 'redo' atom.
sourceraw docstring

replace-prophecy!clj/s

(replace-prophecy! new-atom)

The prophecy atom (where all records are kept to enable 'redo') will be replaced by the new-atom. Useful if you've already done some modifications to the new-atom (like added some watchers).

Usually used with `replace-library'.

The prophecy atom (where all records are kept to enable 'redo')
will be replaced by the new-atom. Useful if you've already done some
modifications to the new-atom (like added some watchers).

Usually used with `replace-library'.
sourceraw docstring

stop-all-records!clj/s

(stop-all-records!)

Remove all the atoms from the overseer watch. The atoms will no longer be watched, nor any of their state saved to history.

Remove all the atoms from the overseer watch. The atoms will no
longer be watched, nor any of their state saved to history.
sourceraw docstring

stop-record!clj/s

(stop-record! k)

Remove the atom associated to this key from the overseer watch. This atom will no longer be watched, nor its state saved to history.

Remove the atom associated to this key from the overseer watch.
This atom will no longer be watched, nor its state saved to
history.
sourceraw docstring

take-snapshotsclj/s

(take-snapshots)
source

trigger-record!clj/s

(trigger-record!)

Trigger a record to history. The current state of at least one atom must be different from the previous one for the record to be included into history.

Trigger a record to history. The current state of at least one atom
must be different from the previous one for the record to be
included into history.
sourceraw docstring

undo!clj/s

(undo!)
source

with-single-before-and-afterclj/s≠macro

clj
(with-single-before-and-after & content)
cljs
(with-single-before-and-after &form &env & content)

Deactivate the watches write to history and execute the body. If any non-passive atom is modified, replace the last history with a snapshot taken just before executing the body and then take another snapshot.

Deactivate the watches write to history and execute the body. If
any non-passive atom is modified, replace the last history with a
snapshot taken just before executing the body and then take another
snapshot.
source (clj)source (cljs)raw docstring

with-single-recordclj/s≠macro

clj
(with-single-record & content)
cljs
(with-single-record &form &env & content)

Temporarily deactivate the watches write to history. A single write is triggered at the end of the macro, assuming at least one of the atoms watched by the overseer has changed.

Temporarily deactivate the watches write to history. A single write
is triggered at the end of the macro, assuming at least one of the
atoms watched by the overseer has changed.
source (clj)source (cljs)raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close