mirror of
https://gitee.com/dgflash/oops-plugin-excel-to-json.git
synced 2026-05-22 18:19:19 +08:00
20 lines
451 B
JavaScript
20 lines
451 B
JavaScript
"use strict";
|
|
|
|
// 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
|