Keep track of and cycle through history
Keep track of and cycle through capped history (chat messages, REPL command-lines etc).
$ component install component/history
Initialize with an array of
Add a value, for example a chat message or REPL command line.
This method resets the history index, meaning the next call
.back() will be this latest value.
Cycle backwards through history, returning a value added by
Cycle forwards through history, returning a value added by
The maximum number of entries defaulting to
Reset the index to the latest value.