Skip to main content

Functions

ensureEndpointIdFormat

Returns: string

parseEndpointId

Returns: EndpointId

isValidUrl

Returns: any

throttle

Returns: (...funcArgs: Parameters<T>) => ReturnType<T> | void

isReact

Not really the most optimal way to detect if we’re running in React, but the idea here is that we can support multiple rendering engines (starting with React), with all their peculiarities, without having to add a dependency or creating custom integrations (e.g. custom hooks). Yes, a bit of magic to make things works out-of-the-box. Returns: any

isPlainObject

Check if a value is a plain object. Returns: boolean

sleep

Utility function to sleep for a given number of milliseconds Returns: Promise<void>

Types

EndpointId