npm.io
1.0.2 • Published 9 years ago

undo-redo-ts

Licence
MIT
Version
1.0.2
Deps
0
Vulns
0
Weekly
0
Stars
1

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();

Keywords