@dom-replay/plugin-sequential-id-replay
v0.0.1
Published
Use this plugin in combination with the [@dom-replay/plugin-sequential-id-record](../core-plugin-sequential-id-record) plugin to record and replay events with a sequential id. See the [guide](../../../guide.md) for more info.
Downloads
15
Readme
@dom-replay/plugin-sequential-id-replay
Use this plugin in combination with the @dom-replay/plugin-sequential-id-record plugin to record and replay events with a sequential id. See the guide for more info.
Installation
npm install @dom-replay/plugin-sequential-id-replayUsage
import { Replayer } from '@dom-replay/replay';
import { getReplaySequentialIdPlugin } from '@dom-replay/plugin-sequential-id-replay';
const replayer = new Replayer(events, {
plugins: [
getReplaySequentialIdPlugin({
// make sure this is the same as the record side
key: '_id', // default value
warnOnMissingId: true, // default value
}),
],
});
replayer.play(); // ERROR: [sequential-id-plugin]: expect to get an id with value "42", but got "666"`