yodata 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
package/data/plugin.js CHANGED
@@ -10,7 +10,7 @@ constructor (dataBaseID, options = {}) {
10
10
  super (dataBaseID, options = {})
11
11
 
12
12
  this.dataBaseID = dataBaseID
13
- this.project = new ws(`wss://y0data.glitch.me/?database_id=${this.dataBaseID}`)
13
+ this.project = new ws(`wss://y0data.glitch.me/?database_id=${this.dataBaseID}`, options.ws || {cache: false})
14
14
 
15
15
  if(!options.nameProcess) options.nameProcess = "plugin"
16
16
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yodata",
3
3
  "description": "Y0data online services to save your data",
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "main": "data/plugin.js",
6
6
  "dependencies": {
7
7
  "events": "^3.3.0",
package/ws/index.js CHANGED
@@ -39,9 +39,10 @@ this._connect(url, this.headers, options)
39
39
  _catchSystem(){
40
40
  setInterval(async ()=>{
41
41
  if(this.cache === true) return;
42
+
42
43
  this._messages = []
43
- for(const d of this.historyPing.filter(data => data.use === true)) this.historyPing.shift(d)
44
- for(const d of this.historySend.filter(data => data.use === true)) this.historySend.shift(d)
44
+ for(const d of this.historyPing.filter(data => data.use === true)) this.historyPing = this.historyPing.filter(x => x.id === d.id)
45
+ for(const d of this.historySend.filter(data => data.use === true)) this.historySend = this.historySend.filter(x => x.id === d.id)
45
46
 
46
47
  }, 500)
47
48
  }