export reset id function
This commit is contained in:
1
index.d.ts
vendored
1
index.d.ts
vendored
@@ -8,3 +8,4 @@ export function serializeNodeWithId(
|
|||||||
doc: Document,
|
doc: Document,
|
||||||
map: idNodeMap,
|
map: idNodeMap,
|
||||||
): serializedNodeWithId | null;
|
): serializedNodeWithId | null;
|
||||||
|
export function resetId(): void;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rrweb-snapshot",
|
"name": "rrweb-snapshot",
|
||||||
"version": "0.4.2",
|
"version": "0.4.3",
|
||||||
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
|
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/module.js",
|
"module": "dist/module.js",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import snapshot, { serializeNodeWithId } from './snapshot';
|
import snapshot, { serializeNodeWithId, resetId } from './snapshot';
|
||||||
import rebuild from './rebuild';
|
import rebuild from './rebuild';
|
||||||
export * from './types';
|
export * from './types';
|
||||||
|
|
||||||
export { snapshot, serializeNodeWithId, rebuild };
|
export { snapshot, serializeNodeWithId, resetId, rebuild };
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function genId(): number {
|
|||||||
return _id++;
|
return _id++;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetId() {
|
export function resetId() {
|
||||||
_id = 1;
|
_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user