elm-community/undo-redo/2.0.0

NOTE: this package is not compatible with Elm 0.19.1

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