isPublishableKey()
A publishable key is the only key allowed in a browser.
function isPublishableKey(key: string): booleanParameters
Section titled “Parameters”keystringRequiredAny string.
Returns
Section titled “Returns”boolean: True for pk_test_… and pk_live_… keys.
Example
Section titled “Example”import { isPublishableKey } from "@tryyoursize/sdk";if (!isPublishableKey(settings.tysKey)) throw new Error("Use the publishable key");Was this page helpful?
Thank you. We read every answer.