JiraDurationUtils equivalent in Connect add-ons

Hi,

Is there a way in Jira connect add-ons, where I can convert estimate strings (1d 2h) into seconds and back again. Potentially something equivalent to JiraDurationUtils in server add-ons.

Regards,
Abhinav.