dexie-relay
Advanced tools
Comparing version 5.0.3 to 5.0.4
11
index.js
@@ -185,6 +185,7 @@ import {Client} from 'relay-to-relay' | ||
const stamps = await dataTab.where('stamp').notEqual(0).toArray() | ||
const count = datas.count || 25 | ||
while(stamps.length){ | ||
datas.session = 'response' | ||
datas.edits = null | ||
datas.stamps = stamps.splice(stamps.length - 25, 25) | ||
datas.stamps = stamps.splice(stamps.length - count, count) | ||
this.client.onSend(JSON.stringify(datas), nick) | ||
@@ -196,3 +197,3 @@ } | ||
datas.stamps = null | ||
datas.edits = edits.splice(edits.length - 25, 25) | ||
datas.edits = edits.splice(edits.length - count, count) | ||
this.client.onSend(JSON.stringify(datas), nick) | ||
@@ -267,5 +268,6 @@ } | ||
} | ||
const count = datas.count || 25 | ||
while(stamps.length){ | ||
datas.session = 'stamps' | ||
datas.stamps = stamps.splice(stamps.length - 25, 25) | ||
datas.stamps = stamps.splice(stamps.length - count, count) | ||
datas.edits = null | ||
@@ -310,6 +312,7 @@ this.client.onSend(JSON.stringify(datas), nick) | ||
} | ||
const count = datas.count || 25 | ||
while(edits.length){ | ||
datas.session = 'edits' | ||
datas.stamps = null | ||
datas.edits = edits.splice(edits.length - 25, 25) | ||
datas.edits = edits.splice(edits.length - count, count) | ||
this.client.onSend(JSON.stringify(datas), nick) | ||
@@ -316,0 +319,0 @@ } |
{ | ||
"name": "dexie-relay", | ||
"version": "5.0.3", | ||
"version": "5.0.4", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
20980
453