https://github.com/fabioricali/undoo
Undo/redo manager
https://github.com/fabioricali/undoo
history history-management undo-redo
Last synced: 11 months ago
JSON representation
Undo/redo manager
- Host: GitHub
- URL: https://github.com/fabioricali/undoo
- Owner: fabioricali
- License: mit
- Created: 2018-02-12T15:25:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-17T08:02:36.000Z (over 8 years ago)
- Last Synced: 2025-07-09T01:15:27.943Z (11 months ago)
- Topics: history, history-management, undo-redo
- Language: JavaScript
- Homepage: https://fabioricali.github.io/undoo/
- Size: 123 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.hbs
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Undoo
Undo/redo manager
## Installation
### Node.js
```
npm install undoo --save
```
### Browser
#### Local
```html
```
#### CDN unpkg
```html
```
## Example
```javascript
const Undoo = require('undoo');
const myHistory = new Undoo();
myHistory
.save('one')
.save('two')
.save('three')
.save('four');
myHistory.undo((item)=>{
console.log(item); //=> three
});
myHistory.current(); //=> three
myHistory.redo((item)=>{
console.log(item); //=> four
});
```
## Use provider
```javascript
const Undoo = require('undoo');
const myHistory = new Undoo({
provider: () => document.getElementById('myTextArea').value
});
myHistory.save();
```
## Demo
## API
{{>main}}
## Changelog
You can view the changelog here
## License
Undoo is open-sourced software licensed under the MIT license
## Author
Fabio Ricali