@zlooun/exceljs
Version:
Fixes the problem with writing a file using streams and not using RAM based on 'exeljs'
16 lines (14 loc) • 447 B
JavaScript
;
// eslint-disable-next-line node/no-unsupported-features/node-builtins
var textDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8');
function bufferToString(chunk) {
if (typeof chunk === 'string') {
return chunk;
}
if (textDecoder) {
return textDecoder.decode(chunk);
}
return chunk.toString();
}
exports.bufferToString = bufferToString;
//# sourceMappingURL=browser-buffer-decode.js.map