vzcode 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vzcode",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Multiplayer code editor system",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -69,7 +69,7 @@ let previousDocument = initialDocument;
69
69
 
70
70
  // Saves the files that changed.
71
71
  const save = () => {
72
- // console.log('saving');
72
+ console.log('saving');
73
73
  const currentDocument = shareDBDoc.data;
74
74
 
75
75
  // Take a look at each file (key) previously and currently.
@@ -125,6 +125,7 @@ let lastExecutedTime = Date.now();
125
125
 
126
126
  // Function to throttle the saving
127
127
  function throttleSave() {
128
+ console.log('throttling');
128
129
  const now = Date.now();
129
130
  if (now - lastExecutedTime > throttleTimeMS) {
130
131
  save();
@@ -135,6 +136,7 @@ function throttleSave() {
135
136
  // Function to debounce the saving
136
137
  let debounceTimeout;
137
138
  function debounceSave() {
139
+ console.log('debouncing');
138
140
  clearTimeout(debounceTimeout);
139
141
  debounceTimeout = setTimeout(save, autoSaveDebounceTimeMS);
140
142
  }