Sorry - I can’t see what I’m doing wrong here, having tried a few ways…
Trying to import and use GitHub - SheetJS/printj: sprintf for JS to give me an sprintf() I can use to format stuff in custom:button-card.
I downloaded the printj.js, installed in /config/www/js/printj.js and added /local/js/printj.js as a Lovelace JS module in the config UI. The browser can see my-ha.mydomain:8123:/local/js/printj.js just fine - but trying to make use of it:
[[[
return PRINTJ.sprintf("%s", "Wibble");
]]]
throws an error in the browser (not an HA error, rest of the cards are fine - this is an error in the console in Chrome’s Dev Window).
I’m clearly not including the module correctly - does anyone see anything obviously wrong?
I’ve just had a lot of success including local and Google fonts via the Lovelave resource UI, just stuck on the JS side…
Many many thanks in advance