@trackunit/shared-utils 0.0.12-alpha-5bf259599b.0 → 0.0.12
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/index.cjs.js +3 -2
- package/index.esm.js +3 -2
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -597,8 +597,9 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
const dataURItoBlob = (dataURI) => {
|
|
600
|
-
|
|
601
|
-
const
|
|
600
|
+
var _a, _b, _c, _d, _e;
|
|
601
|
+
const bytes = ((_a = dataURI.split(",")[0]) !== null && _a !== void 0 ? _a : "").indexOf("base64") >= 0 ? atob((_b = dataURI.split(",")[1]) !== null && _b !== void 0 ? _b : "") : unescape((_c = dataURI.split(",")[1]) !== null && _c !== void 0 ? _c : "");
|
|
602
|
+
const mime = (_e = (_d = dataURI.split(",")[0]) === null || _d === void 0 ? void 0 : _d.split(":")[1]) === null || _e === void 0 ? void 0 : _e.split(";")[0];
|
|
602
603
|
const max = bytes.length;
|
|
603
604
|
const ia = new Uint8Array(max);
|
|
604
605
|
for (let i = 0; i < max; i++) {
|
package/index.esm.js
CHANGED
|
@@ -593,8 +593,9 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
593
593
|
}
|
|
594
594
|
|
|
595
595
|
const dataURItoBlob = (dataURI) => {
|
|
596
|
-
|
|
597
|
-
const
|
|
596
|
+
var _a, _b, _c, _d, _e;
|
|
597
|
+
const bytes = ((_a = dataURI.split(",")[0]) !== null && _a !== void 0 ? _a : "").indexOf("base64") >= 0 ? atob((_b = dataURI.split(",")[1]) !== null && _b !== void 0 ? _b : "") : unescape((_c = dataURI.split(",")[1]) !== null && _c !== void 0 ? _c : "");
|
|
598
|
+
const mime = (_e = (_d = dataURI.split(",")[0]) === null || _d === void 0 ? void 0 : _d.split(":")[1]) === null || _e === void 0 ? void 0 : _e.split(";")[0];
|
|
598
599
|
const max = bytes.length;
|
|
599
600
|
const ia = new Uint8Array(max);
|
|
600
601
|
for (let i = 0; i < max; i++) {
|