API reference@evolu/common › Platform

Platform runtime utilities and capability abstractions.

Detection

VariableDescription
hasNodeBufferDetects if Node.js Buffer is available and should be used.
isDevTrue outside production builds.
isHermesReturns true if running in React Native with Hermes engine.
isServerReturns true if running in a server environment (no DOM).

Integration

NameDescription
FlushSyncDepDependency wrapper for FlushSync.
ReloadAppDepDependency wrapper for ReloadApp.
FlushSyncFlushSync is for libraries like React to flush updates synchronously inside the provided callback to ensure the DOM is updated immediately.
ReloadAppReload the app in a platform-specific way.

Testing

NameDescription
TestGlobalErrorsRecords platform global errors until disposed.
testGlobalUncaughtErrorsRecords platform global uncaught-error reporting until disposed.
testGlobalUnhandledRejectionsRecords platform global unhandled-rejection reporting until disposed.