Yes, there are many functions like this in PsychoPy’s misc module:
e.g. pix2deg():
Note that these functions can take into account a correction for the fact that the screen is flat, rather than an arc of circle. i.e. Each degree of visual angle will correspond to a larger number of pixels with growing eccentricity if you specify correctFlat=True. Otherwise, one degree corresponds to a constant number of pixels across the screen (the value calculated at the centre of the screen). This is not strictly true but is a simplification for most people other than eye movement types, who care about actual eye rotations to a given stimulus.
For those functions to work, you need to provide a monitor object, set up with the appropriate size and distance.
psychopy.tools.* and monitor object will not work when moving this online .they will require one to import psychopy. I have written out my own computation but i am curious if these functions are somehow available in psychoJS.