It has the advantage you can translate between all sorts of projections, not just OSGB.
I'm not a great JS developer, but something like this should do the trick to convert OSGB back to WGS84
oops.. you want the inverse transform.Just swap the two projections around in the proj4 call :)
var osgb = '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs '; var wgs84 = '+proj=longlat +datum=WGS84 +no_defs '; proj4(osgb,wgs84,[200000,500000]);
You can get proj4 strings for any projection using the epsg.io website
It is also available in GitHub