brisky-recorder
Version:
Record and play back vigour-state events
30 lines (24 loc) • 1.37 kB
Markdown
# brisky-recorder
<!-- VDOC.badges travis; standard; npm; coveralls -->
<!-- DON'T EDIT THIS SECTION (including comments), INSTEAD RE-RUN `vdoc` TO UPDATE -->
[](https://travis-ci.org/vigour-io/brisky-recorder)
[](http://standardjs.com/)
[](https://badge.fury.io/js/brisky-recorder)
[](https://coveralls.io/github/vigour-io/brisky-recorder?branch=master)
<!-- VDOC END -->
<!-- VDOC.jsdoc recorder -->
<!-- DON'T EDIT THIS SECTION (including comments), INSTEAD RE-RUN `vdoc` TO UPDATE -->
Record and play back vigour-state events
<!-- VDOC END -->
```javascript
const createState = require('vigour-state/s')
const recorder = require('brisky-recorder')
var state = createState({
your: 'data'
})
recorder.rec(state) // starts recording
// manipulate the state
recorder.export() // Opens a new browser window with the recording shown as JSON
recorder.load() // Opens a new browser window in which you can paste a recording as JSON which will be loaded and can then be played back
recorder.play() // Replays the recorded events
```