MCPcopy Create free account
hub / github.com/stripe/stripe-react-native / isCheckoutSessionResponse

Function isCheckoutSessionResponse

example/src/api/checkoutSession.ts:17–24  ·  view source on GitHub ↗
(
  value: unknown
)

Source from the content-addressed store, hash-verified

15 typeof value === 'object' && value !== null;
16
17const isCheckoutSessionResponse = (
18 value: unknown
19): value is CheckoutSessionResponse =>
20 isRecord(value) &&
21 typeof value.publishableKey === 'string' &&
22 value.publishableKey.length > 0 &&
23 typeof value.checkoutSessionClientSecret === 'string' &&
24 value.checkoutSessionClientSecret.length > 0;
25
26const getCheckoutSessionErrorMessage = (value: unknown): string | undefined => {
27 if (typeof value === 'string') {

Callers 1

Calls 1

isRecordFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…