docs.sheetjs.com/docz/static/next/base64-loader.js

7 lines
233 B
JavaScript
Raw Normal View History

2023-05-26 22:50:23 +00:00
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;