I think it should be fine within the module? Ideally it wouldn't take that long to work out (if an app was just started you're more likely than not wearing the watch), so you wouldn't need to save state between apps and could do what you need in the library.
That's one of the reasons we have isWorn returning a promise - so it can go away, turn on the HRM (for example) and then return true/false when it has an answer
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I think it should be fine within the module? Ideally it wouldn't take that long to work out (if an app was just started you're more likely than not wearing the watch), so you wouldn't need to save state between apps and could do what you need in the library.
That's one of the reasons we have
isWorn
returning a promise - so it can go away, turn on the HRM (for example) and then return true/false when it has an answer