The second option should work for singleton, and this is what I usually use. From the Felix comment, I get the modules are singleton, and option 1 will also work. I am still inclined to go with the second option, as the code makes my intention to use singleton very clear.
const myUtils = {
print() {...}
convert() {...}
}
export default myUtils;
source
share