@mll-lab/js-utils 2.13.0 → 2.14.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/dist/file.d.ts +4 -0
- package/dist/file.test.d.ts +1 -0
- package/dist/index.common.js +14 -0
- package/dist/index.common.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -15187,6 +15187,19 @@ function hasMessage(error) {
|
|
|
15187
15187
|
return typeof error === 'object' && error !== null && 'message' in error;
|
|
15188
15188
|
}
|
|
15189
15189
|
|
|
15190
|
+
/**
|
|
15191
|
+
* Triggers a file download in the browser.
|
|
15192
|
+
*/
|
|
15193
|
+
function downloadBlob(blob, filename) {
|
|
15194
|
+
const link = document.createElement('a');
|
|
15195
|
+
link.href = URL.createObjectURL(blob);
|
|
15196
|
+
link.download = filename;
|
|
15197
|
+
link.style.display = 'none';
|
|
15198
|
+
document.body.appendChild(link);
|
|
15199
|
+
link.click();
|
|
15200
|
+
document.body.removeChild(link);
|
|
15201
|
+
}
|
|
15202
|
+
|
|
15190
15203
|
function __rest(s, e) {
|
|
15191
15204
|
var t = {};
|
|
15192
15205
|
|
|
@@ -15353,6 +15366,7 @@ exports.ISO_DATE_FORMAT = ISO_DATE_FORMAT;
|
|
|
15353
15366
|
exports.ISO_DATE_TIME_FORMAT = ISO_DATE_TIME_FORMAT;
|
|
15354
15367
|
exports.SECONDLESS_DATE_TIME_FORMAT = SECONDLESS_DATE_TIME_FORMAT;
|
|
15355
15368
|
exports.containSameValues = containSameValues;
|
|
15369
|
+
exports.downloadBlob = downloadBlob;
|
|
15356
15370
|
exports.errorMessage = errorMessage;
|
|
15357
15371
|
exports.firstDecimalDigit = firstDecimalDigit;
|
|
15358
15372
|
exports.firstLine = firstLine;
|