Skip to main content

lib/utils

General utility types and functions.

Interfaces

InterfaceDescription
WaitForOptionsOptions for waitFor utility.

Type Aliases

Type AliasDescription
ObjectValueA utility type to extract the values of an object.

Functions

FunctionDescription
deepCloneDeep clone a value, creating a completely independent copy. Recursively clones all nested properties.
deepEqualsDeep equality function for plain objects. Recursively compares all nested properties.
fromBase64Decode a Base64 string. Works in all environments including FiveM client (no atob/TextDecoder).
sleepReturns a promise that resolves after the specified number of milliseconds.
toBase64Encode a string to Base64. Works in all environments including FiveM client (no btoa/TextEncoder).
waitForWait for a condition to become true with timeout.