electrical calculations and conversions javascript API