algolia / algoliasearch-client-javascript

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.
https://www.algolia.com/doc/api-client/javascript/getting-started/
MIT License
1.33k stars 221 forks source link

getSecuredApiKeyRemainingValidity is not available in browser bundle #1493

Open AlexMeah opened 9 months ago

AlexMeah commented 9 months ago

I am trying to implement automatic key refresh using getSecuredApiKeyRemainingValidity but the function only exported in the node bundle.

Would you accept a PR to make getSecuredApiKeyRemainingValidity work in the browser?

Haroenv commented 9 months ago

Officially this module still supports down to IE11, but as the method would be newly added to browser bundles I think it should be ok. What method do you have in mind that's isomorphic?

AlexMeah commented 9 months ago

Depending on what Node versions you support atob landed as a global in v16 https://github.com/nodejs/node/pull/37786 and is compatible back to IE10.