@xpf0000/js-data-history

1.0.0 • Public • Published

Js Data History

Latest Version on NPM Software License npm

Js data history, data change revoke and redo, can set history depth

Table of Contents

Install and basic usage

$ npm install --save @xpf0000/js-data-history
import { History } from '@xpf0000/js-data-history'
const history = new History(5)

const data = {}
history.init(data)
data.a = {}
history.add()
data.b = 5
history.add()
history.back()
history.back().then(change => {
// ...
})

history.redo()
history.redo().then(change => {
// ...
})

License

The MIT License (MIT).

Readme

Keywords

Package Sidebar

Install

npm i @xpf0000/js-data-history

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

28 kB

Total Files

6

Last publish

Collaborators

  • xpf0000