deepgram / deepgram-js-sdk

Official JavaScript SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
156 stars 54 forks source link

Use nullish coalescing #136

Closed nickottocode closed 1 year ago

nickottocode commented 1 year ago

Updates to the Deepgram constructor to use ?? instead of ||. This change makes the SDK compatible with onprem for streaming (batch needs additional updates). The apiUrl could probably be left as ||, but requireSSL needs to be the "nullish coalescing" operator ?? as otherwise if set to "False" for the onprem case the || operator will still default to the default option.

lukeocodes commented 1 year ago

@briancbarrow could we tag this as a pre-release before it goes into main and try it on all of the current projects being built?