How to know if I'm in the editor?

IS there a quick way to know, in the mod JS, if the mod is loaded in the editor versus on a regular page?

In this case, I want to be able to have certain elements always show when I’m in the editor but only show conditionally on embedded mods using data-attributes.

This would be possible but there isn’t currently a method. You could check the window.location.href as a workaround.

Can you elaborate on your use case?