How to get translations on frontend side?

Hi!

I have a question regarding gettext translations, is there any way of how get extracted translations inside js files?

For example in ex files i have dgettext("common", "Save") how can I access this translation on frontend side?

For rails there is a gem that converted all yml file into json, is there something similar?

Thank you!