undo-redo-ts
v1.0.2
Published
An undo/redo manager for Typescript
Downloads
1
Maintainers
Readme
undo-redo-ts
A simple undo/redo manager for typescript.
Install
npm install undo-redo-ts
Usage
import {UndoManager} from 'undo-redo-ts';
const undoManager = new UndoManager();
undoManager.add({
name: 'Undoable thing',
undo: () => {console.log('undo')},
redo: () => {console.log('redo')}
});
undoManager.undo();
undoManager.redo();