@osimatic/helpers-js 1.0.67 → 1.0.68

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.
Files changed (2) hide show
  1. package/file.js +10 -0
  2. package/package.json +1 -1
package/file.js CHANGED
@@ -61,6 +61,16 @@ class File {
61
61
  maximumFractionDigits: fractionDigits
62
62
  }).format(size)) + ' ' + byteUnits[i];
63
63
  }
64
+
65
+ static blobToBase64(blob, callback) {
66
+ let reader = new FileReader();
67
+ reader.onload = function() {
68
+ //let dataUrl = reader.result;
69
+ //let base64 = dataUrl.split(',')[1];
70
+ callback(reader.result);
71
+ };
72
+ reader.readAsDataURL(blob);
73
+ };
64
74
  }
65
75
 
66
76
  const CSV_FILE_EXTENSION = "csv";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.0.67",
3
+ "version": "1.0.68",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"