Undo library for browser and Node.
npm install jundo
var jundo = ;...
To mark an action which can be undone:
undoFunc is the function that will be invoked upon undoing,
redoFunc upon redoing. For example, if an action that adds an object to the screen has been performed, the undo function should remove that object while the redo function should add that object back to the screen.
To undo and redo:
if jundo > 0 jundo;if jundo > 0 jundo;
To clear all registered functions:
For more information, check out the specs.