docs.sheetjs.com/docz/static/next/base64-loader.js
2023-05-26 18:54:05 -04:00

7 lines
233 B
JavaScript

function loader(content) {
/* since `loader.raw` is true, `content` is a Buffer */
return `export default '${content.toString("base64")}'`;
}
/* ensure the function receives a Buffer */
loader.raw = true;
module.exports = loader;