elm-community/undo-redo/3.0.0

UndoList.Encode

Encode UndoList submodule.

Provides JSON encoders for Timelines and UndoList Messages.

Encoders

undolist : UndoList Value -> Value

Encode an undolist of JSON values. Best paired with the map function from UndoList.

encodeUndoList stateEncoder =
    UndoList.map stateEncoder >> undolist
msg : Msg Value -> Value

Encode an UndoList Msg of JSON values. Best paired with the mapMsg function from UndoList.

encodeMsg msgEncoder =
    UndoList.mapMsg msgEncoder >> msg