How can I alternate API keys based on development or production store?

Hi people,

Is there a way to check on which store you are from theme JS? I have some third-party js with development and production API keys which I need to alternate based on Shopify stores. So, if I am in the development store I should use the dev key and vice versa.

Thank you in advance.